3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = ['one1', 'two1', 'three1']; $arr2 = ['one2', 'two2', 'three2']; foreach ($arr1 as $a1) { echo $a1."\n"; foreach ($arr2 as $a2) { if ($a2 === 'two2') { break 2; } echo $a2."\n"; } }
based on 2Sld2
Output for 5.6.38 - 7.3.0rc3
one1 one2