|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2000-10-11 11:56 UTC] stas@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 07:00:02 2025 UTC | 
<? function xx() { global $a; unset($a); } // stage 1 - unset works $a=1; print "a= $a<br>"; unset($a); print "a= $a<br>"; // stage 2 - unset doesn't work in function xx $a=2; print "a= $a<br>"; xx(); print "a= $a<br>"; ?> My Result page: a= 1 a= a= 2 a= 2 - it has to be empty because of previous unset This script is working with PHP3.x