Bug #16876 Updated: Static PHP Variables

From: Date: Sat, 27 Apr 2002 17:39:07 +0000
Subject: Bug #16876 Updated: Static PHP Variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6245@lists.php.net to get a copy of this message
ID: 16876 Updated by: mfischer@php.net Reported By: tonicpeddler@cs.com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Windows XP PHP Version: 4.2.0 New Comment: Please be more specific what you mean. There's already a 'static' modifier for variables within function if you havent spotted it yet. Feel free to re-open the report if you can provide a more clearer description what the goal of your 'static' version should be. Previous Comments: ------------------------------------------------------------------------ [2002-04-27 13:19:40] tonicpeddler@cs.com 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 this bug report at http://bugs.php.net/?id=16876&edit=1

« previous php.bugs (#6245) next »