<?php $factorial = function (int $n) use (&factorial) { if ($n === 1) { return 1; } return $factorial($n - 1) * $n; }; print factorial( 5 ); ?>
You have javascript disabled. You will not be able to edit any code.