3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2, 3, 4, 5, 6, 7, 8, 9); reset ($a); foreach ($a as $v) { //echo('Array points to: ' . current($a) . ' foreach() is at element: ' . $v . PHP_EOL); } echo('After loop array points to: ' . current($a));
Output for hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.3.0rc3
After loop array points to: 1
Output for 4.3.0 - 5.6.38
After loop array points to: