3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $i = 1; $a = array('a','b','c','d','e'); foreach($a as $item){ if($i > 3) break; echo "\n$i"; $i++; }
based on GruPW
Output for 4.3.0 - 7.2.0
1 2 3