3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function calculate($n) { $result = 0; for ($i = 1; $i <= $n; $i++) { for($j = 0; $j <= $i + 1; $j++) { $result += 1; } } return $result; } var_dump(calculate(3));
based on In3nt
Output for 4.3.0 - 7.2.0
int(12)