3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("value1","value2","value3"); for(reset($array),current($array),next($array){ echo("Element ".key($array)." contains ".current($array)."<br/>"; }
Output for 5.4.18
Parse error: syntax error, unexpected '{', expecting ';' in /in/qjcgv on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '{', expecting ';' in /in/eoVAT on line 4
Process exited with code 255.

preferences:
173.96 ms | 1399 KiB | 54 Q