3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('leg1'=>'LA', 'leg2'=>'NY', 'leg3'=>'NY', 'leg4'=>'FL'); while($current = next($a)) { echo "current: " . key($a) . ":" . $current; $next = next($a); echo "next: " . key($a) . ":" . $next; $nextnext = next($a); echo "nextnext: " . key($a) . ":" . $nextnext; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
current: leg2:NYnext: leg3:NYnextnext: leg4:FL