Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Appendix C. OPERATORS


Operator Operation It Performs



  • Addition



  • Subtraction



  • Multiplication
    / Division
    % Modulo Division
    ++ Increment


— Decrement
< Is Less Than



Is Greater Than
<= Is Less Than or Equal To
= Is Greater Than or Equal To
== Is Equal To
!= Is Not Equal To



AND && And


ORl || Or


XOR (^) Exclusive Or
! Not
& And
| Or
^ Exclusive Or
~ One's Complement or NOT >>Shift all bits to the right
« Shift all bits to the left


. Concatenate
$ Reference a Variable
& Reference Variable Storage


-> Reference a Class Method or Property


=> Set argument defaarray element indexult or assign


@ Suppress Function Errors
? Tertiary Conditional Expression
= Assign right side to left side
+= Add right side to left side


-= Subtract right side from left side
*= Multiply left side by right side
/= Divide left side by right side


%= Set left side to left side module right side

Free download pdf