CONSTANT names...

From: Date: Tue, 04 Jan 2005 23:57:57 +0000
Subject: CONSTANT names...
Groups: php.internals 
Request: Send a blank email to internals+get-14281@lists.php.net to get a copy of this message
hi guys, I was mucking around and noticed the following: define("404_SKIP", 1); does not give an error and you can successfully get the value of the constant by doing: constant("404_SKIP"); where as doing: echo 404_SKIP; gives an error. as I understand it, i.e. what the docs say, is that the following regexp expresses valid starting chars for the name of a constant (the same going for vars): /^[a-zA-Z_\x7f-\xff]/ so pretty minor thing here but I expected to see the define() throw a (fatal?) error, rather than letting me go on. kind regards, Jochem

« previous php.internals (#14281) next »