3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $init = 5; $str = round(5/3,2); $iter = 3; $total = $init; for($i = 0; $i < $iter; $i++){ if($i === 0){ $res = $init - ($str * ($iter-1)); }else{ $res = $str; } $total = $total - $res; } var_dump($total);
based on 7NFjp
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
float(0)