Bug #10527: Declare variables as constants

From: Date: Fri, 27 Apr 2001 16:37:44 +0000
Subject: Bug #10527: Declare variables as constants
Groups: php.dev 
Request: Send a blank email to php-dev+get-52590@lists.php.net to get a copy of this message
From: jnutzman@yahoo.com Operating system: Linux PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: Declare variables as constants PHP 4 doesn't seem to have the capability to define variables of all types as being constants. An example of this could be: $stuff = (const)array('1','2'); or $stuff = const($stuff); An error would be generated if the script later tried to: $stuff = array('3','2'); This is *not* the same as CONSTANTS like TRUE and FALSE. This would be extremely useful with sessions, so other programmers don't clobber important session variables that shouldn't change. -- Edit Bug report at: http://bugs.php.net/?id=10527&edit=1

« previous php.dev (#52590) next »