3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Print the value of $x every 10 statements register_tick_function ('printf', "The value of \$x is %d\n", &$x); declare (ticks=10) { for ($x = 1; $x <= 10; ++$x) { echo $x, "\n"; } } ?>
Output for 8.3.5
Parse error: syntax error, unexpected token "&", expecting ")" in /in/E4LEq on line 3
Process exited with code 255.
Output for 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/E4LEq on line 3 1 2 3 4 5 The value of $x is 5 6 7 8 9 10 The value of $x is 10

preferences:
31.49 ms | 493 KiB | 3 Q