PHP 4.0 Bug #4602: changing static variable in recursive function call has no effect after exiting
| From: | sprucely at hotmail dot com | Date: | Fri, 26 May 2000 04:09:08 +0000 |
| Subject: | PHP 4.0 Bug #4602: changing static variable in recursive function call has no effect after exiting | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19467@lists.php.net to get a copy of this message | ||
From: sprucely@hotmail.com
Operating system: Linux Mandrake 6.1
PHP version: 4.0 Release Candidate 2
PHP Bug Type: Scripting Engine problem
Bug description: changing static variable in recursive function call has no effect after exiting
I had a static variable that I would add elements to as my function's recursion would go
deeper. With RC1 and previous versions of PHP, changes to that static array inside recursive calls
would still be there after those recursive calls exited. Not so with RC2 and the final release. I am
now forced to use a global variable to store this temporary array.
This problem has occurred at two separate web hosts I'm using as they upgraded their versions
of PHP - missoulaweb.com and phpwebhosting.com