3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array(1,2,3); print_r(each($x)); echo "\n"; $y =& $x; print_r(each($y)); echo "\n"; $z =& $y; print_r(each($z)); echo "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [1] => 1 [value] => 1 [0] => 0 [key] => 0 ) Array ( [1] => 2 [value] => 2 [0] => 1 [key] => 1 ) Array ( [1] => 3 [value] => 3 [0] => 2 [key] => 2 )