Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42359 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72229 invoked from network); 20 Dec 2008 11:26:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2008 11:26:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:60186] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/90-02661-746DC494 for ; Sat, 20 Dec 2008 06:25:59 -0500 Received: from [83.228.56.37] (port=1981 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1LDzy0-0008PP-7N for internals@lists.php.net; Sat, 20 Dec 2008 05:25:56 -0600 Message-ID: To: References: <002401c96292$aed4aad0$3ffc1f3e@foxbox> Date: Sat, 20 Dec 2008 13:25:49 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-2"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Undefined constants producing E_NOTICE From: sv_forums@fmethod.com ("Stan Vassilev | FM") > Hi Kuba, > >> For the moment some unexpected behaviour caused by use of undefined >> constant may be hard to fix with low error reporting level. > > So don't use a low error reporting level. > > Moreover, >> treating an undefined constant as a string does not make sense. I know >> that PHP is intended to be a flexible language, but for me it's a bit >> thick. > > Just how is PHP supposed to know that some random string is intended to be > anything else? By the quotes :). Undefined variable $foo doesn't fall back to string 'foo' it falls back to null. It's a sane strategy for constants as well. I have no information how people "rely" on this, I know the reason for this fallback is bad syntax like: echo $hi[there]; I'd fix it in 6.0 though. Regards, Stan Vassiev