Cristian Rodríguez wrote:
> Kuba Wieczorek escribió:
>> Hello everyone,
>>
>> Currently when an undefined constant is called, E_NOTICE is produced and
>> the name of the constant is assumed to be a string. In my opinion this
>> behaviour is strange and problematic for most developers. Maybe it would
>> be good if invoking undefined constants will start to produce at least
>> E_WARNING?
> 
> Use class constants
> 
> class foo {
> }
> 
> echo foo::BAR;
> 
> Fatal error: Undefined class constant 'BAR' ...
> 
> that's what you are really looking for... ;)

namespaced constants also cause fatal error when used with qualified name.

Greg

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to