PHP

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

5

"Number of times this for loop will execute: for ($i = 1; $i <= 10; $i = $i + 2) { echo $i; }"

d ef123d efxyz

"Variable $string will contain ________after these statements are executed $string = "abc123abcxyz"; $string = preg_replace('/abc/', 'd ef', $string);"

new

After you have declared a class, you create an object by using the _______ keyword.

multidimensional

An array containing other arrays is known as a(n) _____________ array.

list()

Construct used to split an array into a number of values

$products=['Tires', '0il', 'spark plugs'];

Correct PHP array definition

final function operation(){...}

Correct use of the final PHP keyword for a function

Boolean

Data type that only stores true or false values

string

Data type that will be assigned to the PHP variable $a with the following data assignment statement $a = "Jim";

public

Default PHP class access modifier

feof()

Function in PHP that tests for end of file in a while loop

fwrite()

Function in PHP that will write to a file

fopen()

Function that opens a file in PHP

shuffle()

Function that randomly reorders elements of your array

explode()

Function that splits a string into an array

unlink()

Function that will delete a file

attributes

In object-oriented programming, ___________ are properties or variables that relate to an object.

5

Integer value that the variable $a will contain after the execution of these two PHP statements $a = 3; $a += 2;

global

Keyword used inside of a function to gain access to a variable defined outside of a function

define

Keyword used to declare constants

AND

Logical operator signified by double ampersand (&&) characters

POST

Method recommended as most private when passing form data to a PHP script

!==

PHP array operator that signifies non-identity

0

PHP arrays are indexed. Indexes start at _____ by default.

White Space

PHP engine ignores_________

$email_array = explode('@', $email);

PHP expression that can get the domain name from a customer's email address

require()

PHP statement that allows you to load a file into your PHP script

exit;

PHP statement that completely terminates execution of the script

continue;

PHP statement that will skip to the next iteration of a loop

Number

PHP variable names cannot begin with a _________

get out of function

Purpose of the PHP keyword return

^

Regex token that anchors your match to the beginning of the subject

parameter

Role of 'hello' in the PHP statement function('hello');

{...}

Set of characters used around a block of code

;

Special character that terminates statements in PHP

$

Special character used as the first character before the variable name to make it stand out in a PHP script

$this

Special pointer within a class

//

Symbol that represents a single line comment in PHP

echo '$varname';

Technique used to print the name of the variable, not the contents of the variable

$a == $b

Tests for equal values only between variables $a and $b

last character in $test

The expression $test = substr_replace($test, "X", -1); replaces _____

2nd

The statement $products[1] accesses the ________ element in the array.

5

The statement echo strlen("hello"); will produce a result of ________

ksort()

The three different PHP sorting functions are sort(), asort() and ________

start and end of string

The trim() function removes whitespace ____________

Spain

This is echoed to the browser after these statements are executed: $string = "The rain in Spain falls mainly on the plain"; echo substr($string, 12, 5);

extends

Use the ______ keyword to specify that one class is to be a subclass of another.

functions

You create methods by declaring __________ within a PHP class definition.

operations

___________ are methods, actions, or functions that an object can perform to modify itself or perform some external effect.

LOCK_SH

flock() function operation value that represents a reading lock


Ensembles d'études connexes

College entrance exams: The SAT Reasoning and SAT subject test

View Set

American Heritage Lecture Quotes

View Set

Promulgated Addenda, Notices, and Other Forms Exam Questions

View Set