3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'a', 'b', 'c' ]; foreach(z($a) as &$x) { $x .= 'q'; } print_r($a); function &z($a) { return &$a; }
Output for 5.4.0 - 5.4.30
Fatal error: Cannot create references to elements of a temporary array expression in /in/rgnSL on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/rgnSL on line 3
Process exited with code 255.

preferences:
178.31 ms | 1399 KiB | 67 Q