Monday 2 February 2015

PHP: Postfix and Prefix Operators table

Operation                                                                    Operator    Class     Example                
-----------------------------------------------------------------------------------------
Preincrement: 
Increment operand by one before the variable is used.     ++          Prefix    ++$a

Postincrement: 
Increment operand by one after the variable is used.        ++          Postfix   $a++

Predecrement: 
Decrement operator by one before the variable is used.    --          Prefix    --$a

Postdecrement: 
Decrement operand by one after the variable is used.       --          Postfix   $a-- 

0 comments:

Post a Comment