3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $count = 0; for ($i = 0; $i < 10; $i++) { if (($i % 3) || ($i % 5)) { $count += $i; printf('Sum of $i: ' . $count); } }
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.0
Sum of $i: 1Sum of $i: 3Sum of $i: 6Sum of $i: 10Sum of $i: 15Sum of $i: 21Sum of $i: 28Sum of $i: 36Sum of $i: 45