note 38588 added to language.constants
| From: | chronitonatgmxdotli at rn2 dot php dot net | Date: | Sun, 28 Dec 2003 22:30:17 +0000 |
| Subject: | note 38588 added to language.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62619@lists.php.net to get a copy of this message | ||
In fact, ANY string can be the name of a constant.
<?
define ($name, 'foo');
echo constant($name)
?>
$name can be anything. It will even print 'foo' if $name is undefined (because $name will
evaluate to an empty string in that case).
----
Manual Page -- http://www.php.net/manual/en/language.constants.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38588
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38588&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38588&report=yes
Search -- http://master.php.net/manage/user-notes.php