3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = [0, 1, 2]; $y = $x; $y[] = 3; var_dump(cur($x), cur($y));
based on 405uU
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function cur() in /in/2WHDH:7 Stack trace: #0 {main} thrown in /in/2WHDH on line 7
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Fatal error: Call to undefined function cur() in /in/2WHDH on line 7
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/2WHDH on line 3
Process exited with code 255.