3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $val = array(1,0,2,1,1); $subtract = 3.5; foreach ($val as &$number) { $subtract -= $number; $number = ($subtract > 0) ? 0 : -$subtract; if ($subtract <= 0){ echo $number ;} break; }
Output for 5.6.30, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.2.9