Mega Code Archive

 
Categories / Php / Operator
 

Postfix and Prefix Operators summary 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--