Skip to content

Instantly share code, notes, and snippets.

@richardpq
Created September 9, 2015 15:03
<?php
public function factorial($number)
{
if ($number == 1) {
return 1;
}
$total = $number * $this->factorial($number - 1);
return $total;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment