3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $f = 1; $number = 6; function factorial($number){ for ($i = 1; $i <= $number; $i++){ $f = $i*$f; echo $f; } } echo "El factorial de " . $number . " es " . $f; ?>
Output for 4.3.0 - 7.1.0
El factorial de 6 es 1