3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $multiplesOf3 = array(); $multiplesOf5 = array(); for($i = 1; $i <= 1000; $i++) { if($i % 3 == 1) $multiplesOf3[] = $i; if($i % 5 == 1) $multiplesOf5[] = $i; } $multiples = array_merge($multiplesOf3,$multiplesOf5); $multiples = array_sum($multiples);
Output for 4.3.0 - 7.1.0