Showing posts with label PHP Postfix. Show all posts
Showing posts with label PHP Postfix. Show all posts

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--