3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $inc = 2; $s=0; recv(5); function recv($v) { global $inc,$s; if ($v >= 1) { echo $inc * $v . " "; $v--; $s = $s + $inc * $v; recv($v); } } echo "The sum is $s"; ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
10 8 6 4 2 The sum is 20