Re: Static and Global at the same time!
| From: | Andrei | Date: | Fri, 10 Feb 2006 15:57:38 +0000 |
| Subject: | Re: Static and Global at the same time! | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230216@lists.php.net to get a copy of this message | ||
A static defined variable used in a function will keep it's value each time the function is called, but this function is available only for function's scope.
A global defined variable used in a function will keep it's values (as long as this value is not changed in "body" of the script or in other functions), and the variable is available for script scope.
Andy