note 95528 deleted from function.constant by danbrown
| From: | danbrown@php.net | Date: | Thu, 07 Jan 2010 17:19:28 +0000 |
| Subject: | note 95528 deleted from function.constant by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164745@lists.php.net to get a copy of this message | ||
Note Submitter: coaster
----
@roller
I don't think this code works:
<?php
!defined("CONSTANT_NAME") || constant("CONSTANT_NAME");
?>
because:
<?php
echo !defined("CONSTANT_NAME") || constant("CONSTANT_NAME");
?>
Output: 1
<?php
define("CONSTANT_NAME", "foo");
echo !defined("CONSTANT_NAME") || constant("CONSTANT_NAME");
?>
Output: 1