3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2, 3); $b = array( 'lol' => 'whut', 'ohgod' => 'why', 'please' => 'stop', ); next($b); foreach ($a as $v) { var_dump($v); if ($v == 2) { // this array is lame, let's bail $a = $b; } }
based on mCVWH
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
int(1) int(2) int(3)