Strange –> Operator
<?php
$i = 10;
while( $i --> 0) {
print $i . ', ';
}
This PHP code is valid. It works because of the way operator syntax is parsed: it’s another way of writing while ($i-- > 0): the spaces are not important in this syntax. The result is a very visual way to explain what the loop is doing.
See Also
- down to 0 [Try me]
PHP Features
Last updated: 11 October 2026