Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14612 invoked from network); 20 Dec 2008 16:40:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2008 16:40:39 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 74.125.46.30 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 74.125.46.30 yw-out-2324.google.com Received: from [74.125.46.30] ([74.125.46.30:24895] helo=yw-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/00-14487-6002D494 for ; Sat, 20 Dec 2008 11:40:39 -0500 Received: by yw-out-2324.google.com with SMTP id 5so720377ywb.83 for ; Sat, 20 Dec 2008 08:40:36 -0800 (PST) Received: by 10.64.88.13 with SMTP id l13mr3468669qbb.83.1229791235711; Sat, 20 Dec 2008 08:40:35 -0800 (PST) Received: from monster.local ([76.84.25.107]) by mx.google.com with ESMTPS id 12sm7074882qbw.29.2008.12.20.08.40.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Dec 2008 08:40:34 -0800 (PST) Message-ID: <494D1FFF.3090703@chiaraquartet.net> Date: Sat, 20 Dec 2008 10:40:31 -0600 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: =?UTF-8?B?Q3Jpc3RpYW4gUm9kcsOtZ3Vleg==?= CC: internals@lists.php.net References: <494CF47A.3000300@suse.de> In-Reply-To: <494CF47A.3000300@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Undefined constants producing E_NOTICE From: greg@chiaraquartet.net (Greg Beaver) 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