3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array('1', '2', '3'); foreach ($arr as $key=>$val) { if (count($arr)<4) array_push($arr, '999'); echo $val."\n"; }
Output for 4.3.0 - 7.1.0
1 2 3