3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $c = 0; $num = 2; $array = array(1,2,3,4,5,6,7); foreach($array as $key) { $c++; prev($array); echo key($array); if($c == 6) { break; } }
based on DUUMN
Output for 4.3.0 - 5.2.3, 7.0.0 - 7.1.0
Output for 5.2.4 - 5.6.28
0