From: [EMAIL PROTECTED] Operating system: Windows XP PHP version: 4.2.0 PHP Bug Type: Feature/Change Request Bug description: Static PHP Variables
I think some php users might find it useful if you could declare a variable as a static variable. When the script finishes executing, PHP rewrites the original declaration of those variables to the values they had at the end of script execution. Maybe I'm wrong, or maybe there's a more effective way to accomplish this, but there is certainly a very obvious and simple syntax for such a feature. static $var = value; It would certainly simplify a lot for me, and probably at least a few other people. -- Edit bug report at http://bugs.php.net/?id=16876&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16876&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16876&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16876&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16876&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16876&r=support Expected behavior: http://bugs.php.net/fix.php?id=16876&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16876&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16876&r=submittedtwice