Re: [Fwd: [PHP] constant() - php5]
| From: | Derick Rethans | Date: | Fri, 01 Jul 2005 13:43:30 +0000 |
| Subject: | Re: [Fwd: [PHP] constant() - php5] | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17058@lists.php.net to get a copy of this message | ||
On Fri, 1 Jul 2005, Jochem Maas wrote:
> echo constant('CNST');
>
> when:
>
> echo CNST;
>
> only triggers an E_NOTICE.
> (assuming, in both cases that CNST is not defined).
>
> IMHO it should at most trigger an E_NOTICE.
Did you compare the output of the two statements?
echo constant('CNST');
shows nothing (except the warning)
echo CNST;
shows "CNST" (and a notice).
This makes perfect sense to me to differentiate between them like this.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org