Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81308 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71043 invoked from network); 28 Jan 2015 15:43:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2015 15:43:06 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:60699] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/E0-44076-98309C45 for ; Wed, 28 Jan 2015 10:43:05 -0500 Received: by mail-wi0-f175.google.com with SMTP id fb4so12848011wid.2 for ; Wed, 28 Jan 2015 07:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=+oNbQWRvvf64eAEw3SPBa24Xdvt9FQXcsW/n8tdWbqw=; b=D1CehZYBkcfzldk1YT0u3SkvsTN6KDomx6sQv+dYarXUcHrCE1zDZ+HLKYI2WM5mIE a6yDVzy2oe6VNNTLa1WZ8erfH3+BlYbWU7omcmKUoBaRbVqg2iB0arTz6Qa1iVyBu20n gqpRBzIdJ4eWjDEng04zqF9PO9hw7Z/+n1ySB70MBRkG8EiKcqUek8mau6XscEk1E2ta sw2xqA4iIx8UvNCBXC2WvMX8lLWPDGw7y7bvbQh9d3JnOAobsIMz/r69FWRGTSG8y7JF bK/Q/n+enL4Pd20HfKFTqgWztOR1XbVu4JC31qBIDMi500vKvhK/efqWXigQvrcxXz3R matw== X-Received: by 10.194.94.164 with SMTP id dd4mr9043534wjb.56.1422459781544; Wed, 28 Jan 2015 07:43:01 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id vq9sm6614267wjc.6.2015.01.28.07.43.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2015 07:43:00 -0800 (PST) Message-ID: <54C90367.5010903@gmail.com> Date: Wed, 28 Jan 2015 15:42:31 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: PHP Internals References: <54C80F4F.7020905@gmail.com> <011d01d03ab7$dd725c30$98571490$@tekwire.net> <54C8BE99.8070109@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------040103080806060308080000" Subject: Re: [PHP-DEV] Proposal: Raise severity of undefined constants From: rowan.collins@gmail.com (Rowan Collins) --------------040103080806060308080000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Ferenc Kovacs wrote on 28/01/2015 12:13: > > E_DEPRECATED is likely to be even more ignored than E_NOTICE, so > would be a step backwards; my whole assumption is that most people > getting the message are not using a deprecated feature, but > accidentally mis-typing a constant or keyword. I'd be happy with > raising it to E_WARNING to make it more noticeable, though, if we > don't think removing the functionality is acceptable. > > > turn it into E_WARNING if we are planning to keep the feature, turn it > into E_DEPRECATED if we want to remove the feature later on. I see absolutely no advantage in changing this into E_DEPRECATED, as it's even more likely to be hidden or ignored than E_NOTICE. There are actually two parts to the message: that you used an undefined constant, and that PHP interpreted this as you wanting a string. If you really intended a string, then "deprecated" is relevant; but if you intended a keyword or constant, then there is nothing to deprecate, it's just an error. If we want to keep the string fallback for now, how about we raise the severity to E_WARNING, and change the message to mention deprecation? e.g. Warning: Use of undefined constant foo - assumed 'foo', but this behaviour will change in a future version Regards, -- Rowan Collins [IMSoP] --------------040103080806060308080000--