Re: Bug #10810 Updated: unset in function doesn't work on global arrays
| From: | Martin Sander | Date: | Fri, 11 May 2001 10:13:20 +0000 |
| Subject: | Re: Bug #10810 Updated: unset in function doesn't work on global arrays | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-54858@lists.php.net to get a copy of this message | ||
> Not a bug. The unset ($ar) in the unset all function removes the reference to the global
> variabele.
If you remove the "//"s, the array $ar is still available in UnsetAll()
> function UnsetAll() {
>
> global $ar;
>
> //echo "t1s: <br>n"; ListIt(); echo ":t1e <br>n";
>
> unset($ar);
>
> //echo "t2s: <br>n"; ListIt(); echo ":t2e <br>n";
>
> }