Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98026 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37433 invoked from network); 29 Jan 2017 20:43:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2017 20:43:02 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.160 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.160 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.160] ([81.169.146.160:15121] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/E7-06271-3D35E885 for ; Sun, 29 Jan 2017 15:43:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1485722576; l=3661; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=zt1f6gSJgV0ooqR62bg84zTOGtw6GjpU5a1Ne98hiYo=; b=eF32V2OH4xYnE7QojPrvp+lEmWYInLYUxfcRourr3xblTpOYb3INNqZTpfTpEVjSA+ jMdSepUkKHEWdxLXIah92ugU7324K69qlJxXxm7QKkLU1QxOLJXFnHi45zk4Vlvs5TUD KuOQmGTwlSSqcg0qA0DreA+IYj7SKUEp0cibo= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoBPBqD/tJ8= X-RZG-CLASS-ID: mo00 Received: from mail-qk0-f174.google.com ([209.85.220.174]) by smtp.strato.de (RZmta 39.11 AUTH) with ESMTPSA id j087cct0TKgusIH (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Sun, 29 Jan 2017 21:42:56 +0100 (CET) Received: by mail-qk0-f174.google.com with SMTP id 11so111558276qkl.3 for ; Sun, 29 Jan 2017 12:42:56 -0800 (PST) X-Gm-Message-State: AIkVDXLyxNIURZ5eNCi9TS0AMK/DPi2BfPN5kcUZEoW8+N2+XlDsABMRz77SVIKxSNbWoQofwLW0I4KIe3RF+g== X-Received: by 10.55.120.3 with SMTP id t3mr18310974qkc.0.1485722575730; Sun, 29 Jan 2017 12:42:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.144.132 with HTTP; Sun, 29 Jan 2017 12:42:55 -0800 (PST) In-Reply-To: <0c5fc86b-5050-fe73-7afa-b3e5a38ad370@gmail.com> References: <0c5fc86b-5050-fe73-7afa-b3e5a38ad370@gmail.com> Date: Sun, 29 Jan 2017 21:42:55 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=94eb2c065d985c8204054741be33 Subject: Re: [PHP-DEV] [RFC] Deprecate and Remove Bareword (Unquoted) Strings From: me@kelunik.com (Niklas Keller) --94eb2c065d985c8204054741be33 Content-Type: text/plain; charset=UTF-8 2017-01-29 20:33 GMT+01:00 Rowan Collins : > Good evening all! > > Currently, if the constant FROB_ACTIVE is not defined, the code "echo > FROB_ACTIVE;" results in an E_NOTICE and the string 'FROB_ACTIVE' being > displayed. I would like to propose that this be changed to an E_WARNING in > PHP 7.2, and to an Error in PHP 8.0. > > My reasoning for this includes: > > - consistency with other "undefined" errors, including the otherwise > identical "echo \FROB_ACTIVE;" > - the fallback to string appears to be largely undocumented except to > discourage its use > - the error can mask serious bugs, such as when mis-typing keywords > > I have tried to anticipate some of the questions that will be raised, so > have drafted an RFC rather than trying to fit all the detail into one > e-mail: https://wiki.php.net/rfc/deprecate-bareword-strings > > Please read my proposal, and let me know your thoughts. I have placed the > RFC "under discussion", but will be happy to modify it based on feedback, > and am in no haste to put it to a vote. > > Regards, > > -- > Rowan Collins > [IMSoP] > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > I think it should emit an E_DEPRECATED instead of E_WARNING, but otherwise +1. --94eb2c065d985c8204054741be33--