3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [1,2,3,4,5]; next($array); next($array); var_dump(current($array)); // 2 foreach ($array as $item) { continue; // iterate over array } var_dump(current($array)); // 2. В PHP 5.5 будет NULL
based on nf3Cg
Output for 7.0.0 - 7.2.0
int(3) int(3)
Output for 5.4.11 - 5.6.28
int(3) bool(false)
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/gJQrk on line 3
Process exited with code 255.