#39501 [Opn->Bgs]: Docs incorrectly explain the rules for naming variables and constants

From: Date: Fri, 17 Aug 2007 12:08:01 +0000
Subject: #39501 [Opn->Bgs]: Docs incorrectly explain the rules for naming variables and constants
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969377593@lists.php.net to get a copy of this message
ID: 39501 Updated by: vrana@php.net Reported By: z_rules55 at hotmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment: $GLOBALS['2a'] is an array key which is not restricted. define() documentation doesn't restrict name either. Only for handy use through $var_1 or CONST_1 rules are defined in the language chapter. Previous Comments: ------------------------------------------------------------------------ [2006-11-13 16:59:57] z_rules55 at hotmail dot com Description: ------------ As I had previously reported here (http://bugs.php.net/bug.php?id=39150), PHP does in fact allow the creation of variables and constants with names that contain invalid characters. As far as I can tell, PHP will let you create a variable or constant with any string whatsoever, even a binary one. Whether or not it is desirable to allow this behavior is not the point of this report; but if it is desirable, or if it's not going to be fixed, could the docs please be updated to clarify the fact that you *can* use invalid variable/constant names? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39501&edit=1

« previous php.doc (#969377593) next »