3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $top30 = [9,8,7,6,4,3,2,1]; for($i = 0; $i < count($top30); $i++) { if($top30[$i] < 5) { array_splice($top30, $i, 0, 5); } } var_dump($top30); ?>
based on CcdYb
Output for 5.4.1 - 7.2.0

Process exited with code 137.
Output for 5.3.13 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/FHFEs on line 3
Process exited with code 255.