RE: [PHP] BUG in recursion

2002-04-02 Thread Rick Emery
No, this is NOT a bug. You recurse 10 times down into the function. Therefore, as you come back up and exit the previous call to test(), you complete Test's processing, which is to print j The recursion process is as expected and correct == At 09:59 AM 31/03/2002, Ur

Re: [PHP] BUG in recursion

2002-04-01 Thread Tom Rogers
Hi One way is to use a variable to track the recursion llike this: $y will always be 1 as long as it is in recursion only going to 0 on the last one. Tom At 09:59 AM 31/03/2002, Uros Gruber wrote: >Hi! > >This is a code > >function Test() >{ > static $count = 0; > > $count++; > ec

Re: [PHP] BUG in recursion

2002-03-30 Thread Lars Torben Wilson
On Sat, 2002-03-30 at 15:59, Uros Gruber wrote: > Hi! > > This is a code > > function Test() > { > static $count = 0; > > $count++; > echo $count; > if ($count < 10) { > Test (); > } > echo "j"; > } > test(); > > Output is > > 12345678910jj > > Why is