note 76542 deleted from language.constants by danbrown

From: Date: Fri, 12 Jun 2009 22:18:33 +0000
Subject: note 76542 deleted from language.constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156826@lists.php.net to get a copy of this message
Note Submitter: Sinured ---- > "A valid constant name starts with a letter or underscore, followed by any number of > letters, numbers, or underscores." This rules only applies when using constants like <?php echo CONSTANT;?> to not confuse the parser - PHP will be happy with any string for a constant name (define). <?php define('Red herring!', '<°)))><'); #echo Red herring!; // The above example will not work, the parser will get // angry seeing a whitespace where it shouldn’t be. // Let’s have that with constant(): echo constant('Red herring!'); // <°)))>< ?> You could go on with newlines, tabs and stuff... that is, however, crude coding style.

« previous php.notes (#156826) next »