3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = 6; $sum = 0; for ($i = 1; $i <= $n; $i++) { $sum += $i; } print "sum = $sum\n"; ?>
based on n6HTp
Output for 4.3.0 - 7.2.0
sum = 21