|
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 GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 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