note 24239 deleted from language.functions by googleguy

From: Date: Sat, 19 Jan 2013 03:49:51 +0000
Subject: note 24239 deleted from language.functions by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193263@lists.php.net to get a copy of this message
Note Submitter: germanAlonso at keltoi-web dot com ---- Although yasuo_ohgaki@hotmail.com has already pointed the recursion support on PHP, here's another example, wich shows clearly the mechanism of recursive algorithms: function fact($i){ if($i==1){ return 1; }else{ return $i*fact($i-1); } } It returns $i! (supposing $i is a valid positive integer greater than 0).

« previous php.notes (#193263) next »