Bug #15570: unset and static variables

From: Date: Fri, 15 Feb 2002 15:21:56 +0000
Subject: Bug #15570: unset and static variables
Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-362@lists.php.net to get a copy of this message
From: ivan.lamouret@novitek.fr Operating system: PHP version: 4.1.1 PHP Bug Type: Documentation problem Bug description: unset and static variables The example about static variables in the manual page for "unset" is broken : the output is actually 1 2 3 (not 1 1 1) there is no reset. function foo() { static $a; $a++; echo "$a\n"; unset($a); } foo();foo();foo() From the discussion of bugs 2015, 6810, and 13967 it seems it is clearly an error in the doc. Ivan -- Edit bug report at http://bugs.php.net/?id=15570&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15570&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15570&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15570&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15570&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15570&r=support Expected behavior: http://bugs.php.net/fix.php?id=15570&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15570&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15570&r=submittedtwice

« previous php.bugs (#362) next »