Skip to content

Instantly share code, notes, and snippets.

@alxfv
Created August 25, 2014 19:26
Show Gist options
  • Save alxfv/f1b68b56c3867b73f104 to your computer and use it in GitHub Desktop.
Save alxfv/f1b68b56c3867b73f104 to your computer and use it in GitHub Desktop.
Print 0-10
<?php
function solve($n) {
if ($n > 0) {
echo solve($n - 1);
}
return $n;
}
solve(10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment