3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = array(1,2,3,4,5); while($input) { array_splice($input, 0, 2); print_r($input); }
based on kiKHX
Output for 4.3.0 - 7.1.0
Array ( [0] => 3 [1] => 4 [2] => 5 ) Array ( [0] => 5 ) Array ( )