BUG in recursion
| From: | Uros Gruber | Date: | Sat, 30 Mar 2002 23:59:29 +0000 |
| Subject: | BUG in recursion | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90822@lists.php.net to get a copy of this message | ||
Hi!
This is a code
function Test()
{
static $count = 0;
$count++;
echo $count;
if ($count < 10) {
Test ();
}
echo "j";
}
test();
Output is
12345678910jjjjjjjjjj
Why is there 10 j at the and. If this would work it can be
only one. If $count is grater than 10 it does not call itself
but end. Is this maybe a bug or what.
--
lp,
Uros mailto:uros.gruber@sir-mag.com