note 26147 deleted from function.constant by didou
| From: | didou@php.net | Date: | Wed, 21 Apr 2004 15:12:40 +0000 |
| Subject: | note 26147 deleted from function.constant by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68445@lists.php.net to get a copy of this message | ||
Note Submitter: PHPdotNET <AT> Hollemans <DOT> org
----
If the string <name> is not (yet) registered as a constant, it will return false and generate
a Warning (Couldn't find constant <name> in <file> on line <line nr>).
This can be used in a construction to avoid a file from being executed twice:
if ( ! @constant ( "<file_id>" ) ) {
define ( "<file_id>", true );
<statements>
<functions>
<other code>
}