PHP » Operators » --

Syntax:
$var--
--$var
var
Variable to decrement.

Decrementation.

This operator is a fast way to decrement a variable by one step. The variable value can be used at the same time it is decremented. If the operator is placed before the variable, the expression evaluates to the value after decrementation. If it is placed after the variable, it is the value before decrementation.

Examples

Code:
<?php

$b = 10;
print $b-- . " " . $b;

$c = 3.14;
print "<br>" . --$c;

?>
Output:
10 9
2.14
Explanation:

This operator is not limited to integers, but can also be used on floats and characters.