Incrementing and Decrementing operators are very widely used in most programming languages. They allow a PHP programmer to increment and decrement values as needed.
- Pre-Increment ++$MyVariable Result Increments $MyVariable by one.
- Post-Increment $MyVariable++ Result Returns $MyVariable, then increments $myVar by one.
- Pre-Decrement --$MyVariable Result Decrements $MyVariable by one.
- Post-Decrement $MyVariable-- Result Returns $MyVariable, then decrements $myVar by one.