PHP Increment & Decrement Operators

PHP increment operators are used to increment a variable's value.

PHP decrement operators are used to decrement a variable's value.

Operator Name Result
++$a Pre Increment Increment $a by 1 and then return.
$a++ Post Increment Return $a and then Increment $a by 1.
--$a Pre Decrement Decrement $a by 1 and then return.
$a-- Post Decrement Return $a and then Decrement $a by 1.