Re: Undefined constants producing E_NOTICE
| From: | Cristian Rodríguez | Date: | Sat, 20 Dec 2008 13:34:50 +0000 |
| Subject: | Re: Undefined constants producing E_NOTICE | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42360@lists.php.net to get a copy of this message | ||
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... ;)
--
"We have art in order not to die of the truth" - Friedrich Nietzsche
Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc