Module 2 Flashcards
It is a symbol that specifies a particular action in an expression.
operator
This operator is for object instantiation.
new
This operator is for expression subgrouping.
( )
This operator is for index enclosure.
[ ]
This operator is for error suppression.
@
This operator is for expression separation.
,
It is a characteristic of an operator that specifies how operations of the same precedence are evaluated as they are executed.
Operator Associativity
It is a characteristic of operators that determines the order in which they evaluate the operands surrounding them.
Operator Precedence
Arithmetic Operators in PHP
+, -, *, /, %
Assignment Operators in PHP
= | assignment
+= | add-ass
-= | sub-ass
*= | mult-ass
/= | div-ass
%= | mod-ass
.= | concat-ass
What is the operator used to check if values are identical (i.e. same value and data type)
=== | ($a === $b)
What is the escape sequence for carriage return.
\r
What is the escape sequence for octal notation.
\ [0-7]{1,3}
What is the escape sequence for hexadecimal notation.
\x[0-9A-Fa-f]{1,2}
What are the looping statements in PHP?
for, while, and do-while
What are the conditional statements in PHP?
if, elseif, else, and switch
What is the alternative enclosure syntax for if statements?
{ = : and } = endif;
This statement is placed within the code of a loop to cause the program to break out of the loop statement.
break
This statement causes execution of the current loop iteration to end and commence at the beginning of the next iteration.
continue
This statement is used to jump to the other section of the program to support labels.
goto
What is the associativity of index enclosure | [ ]?
Right
What is the associativity of !, ~, ++, – ?
Right
What is the associativity of error suppression | @ ?
Right
What is the associativity of /, *, % ?
Left
What is the associativity of +, -, . ?
Left
What is the associativity of «,»_space; ?
Left
What is the associativity of &, ^, | ?
Left
What is the associativity of &&, || ?
Left
What is the associativity of a ternary operator?
Right
What is the associativity of an assignment operator?
Right
What is the associativity of AND, OR, XOR ?
Left
What is the associativity of “,” ?
Left
What is the associativity of new ?
NA
What is the associativity of ( ) ?
NA
What is the associativity of <, >, <=, >= ?
NA
This operator is for increments.
++$a | $a++
This operator is for decrements.
–$a | $a–
Comparison Operators in PHP
<, >, <=, >=, ? :
Logical Operators in PHP
&&, AND, ||, OR, !, NOT, XOR
Equality Operators in PHP
==, !=, ===
Bitwise Operators in PHP
&, |, ^, ~, «,»_space;