Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98027 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39196 invoked from network); 29 Jan 2017 20:50:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2017 20:50:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.180 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.180 mail-yw0-f180.google.com Received: from [209.85.161.180] ([209.85.161.180:36838] helo=mail-yw0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/38-06271-FA55E885 for ; Sun, 29 Jan 2017 15:50:56 -0500 Received: by mail-yw0-f180.google.com with SMTP id v200so45033791ywc.3 for ; Sun, 29 Jan 2017 12:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CQuUUfJWCji6VNBrxJO0ZQii3Qoa8KVOwfsd/6Dp9vI=; b=GQcjTdxShs6IwlNwT0pA0D8A3FmkQyJteRTdByqAizzNgcVjnKuLldhzKUT6OlsJUv wgK+MlpN5uKlI5TH1ULZFGVRBYAfEKU012B0fligBeKCAWBTtOaDmjT/r6Ya0L2kCIsO Bw8FGvs04639zg5z2Fp3uVIfsY/AWU4WRCG8naZEpwiZO1DXI9p+T8xzgvI+a7Fp28lQ W9Phalei8CddJihhtGxVM8PWxIbVstIzAV71NuLSZiBvADezn2t6aDvvdA98tXb3vjS5 xfwdchrxVc1w6Sd9Tvk4PS9PK2ltRZqy3EtIKP9k0SbBs/0NNtvKoprK565wXtiGDlZ6 SJgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CQuUUfJWCji6VNBrxJO0ZQii3Qoa8KVOwfsd/6Dp9vI=; b=fAQ3DiI1BGCqvMaM9otoBaNGgTmkAUcFJkqfE4PLZYgMXILHOnEtL31gbYiAzV21CP C4uCcEigQOn8DrdqkJdPD8/bCIqE2hpN0Oj2r//1wFzvixMMYnRXgNk3LUGcq67x1utU Kq/DPRuPkKTCapZiXWMsT2Rs2YFnwfYlC4c5kuN3qwL8RcjFfvroptOZHCMIv4sxm1qO 8UtJn2APxf/gZKdbDes37tiCbOhSJGw8qd0UbMfSEfVakaXwwWc/bq7WAUCivp368V6a x3Aib9emv1pB3+HF3CUvJKFxcfCUYx2djO9avUyVBuBPfN38ToU9OeI7PGCm5ca1u8mq n01w== X-Gm-Message-State: AIkVDXIBY86vO/E9HM37vcbMZVuCWkt1m5eOeqqp1aDTceVQoeXhdV4PoyUVda6P7g6/jURM8l1yqLn3G5zunQ== X-Received: by 10.129.141.6 with SMTP id d6mr12245010ywg.198.1485723053220; Sun, 29 Jan 2017 12:50:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.80.215 with HTTP; Sun, 29 Jan 2017 12:50:52 -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:50:52 +0100 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=f403045e61fcd271f6054741dad8 Subject: Re: [PHP-DEV] [RFC] Deprecate and Remove Bareword (Unquoted) Strings From: nikita.ppv@gmail.com (Nikita Popov) --f403045e61fcd271f6054741dad8 Content-Type: text/plain; charset=UTF-8 On Sun, Jan 29, 2017 at 8:33 PM, Rowan Collins wrote: > 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. > Fully agree with this proposal. Also agree with the choice of throwing a Warning instead of a Deprecation. Throwing a Deprecation would essentially *downgrade* the current error level, which does not appear to be prudent. Nikita --f403045e61fcd271f6054741dad8--