Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98025 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33988 invoked from network); 29 Jan 2017 19:33:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2017 19:33:29 -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 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:36291] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/87-06271-7834E885 for ; Sun, 29 Jan 2017 14:33:27 -0500 Received: by mail-wm0-f52.google.com with SMTP id c85so186563281wmi.1 for ; Sun, 29 Jan 2017 11:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=jWN72wqjBNb62MynrtltXifN0pITDPBrcaAEjqoPQrk=; b=AKBqygADtCaBv4ozUk/19nR+kJdvYzdFz+gBp6Q+ffDKl2lpXoiZXJ97sVKlVKJL4/ UoA746l8Bn/MXRzCA9RrzeRpEMesU1RFFfwUcKlGijwU97e2fQ8AtdPT8XvDbsHCqF+x 4qRa2uqCja1FJNDSaMcUkSe4ZkYBiUP5W3gKxwOJHG+IX2rXWTw/8G2Fub+qBTb/bprG uowQKeY+KviqN8Hor2PDG/a1egBF3Qy2/V9Q7y8fSIcOM91j6xBEGit4hafC5AfFAXM+ IA264zpATMs6RNYMjtdE/ILgO3r2mfDRbwrRTzA+9MUF8QnPOKru7+a935uXzq84bcIc Rh7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=jWN72wqjBNb62MynrtltXifN0pITDPBrcaAEjqoPQrk=; b=N/SctnSUYQr7YgLSs3sn0MHQOlhuwIMa2yaCP6MKanfMS2vJSiXjHXmH/arCt3o1nE MM6lwAEE94ObzTvesH07uwGYk3fR0tV999oImTTuz1uvepYOzDaa0QIC59jeoZYP8aw6 QRoc3RMJInFic2lXgG5g/5gbTig8n/ctN/+5ztJVvx8FJa7Ga7CmJVDPZlJIEzA0fGi9 xnt3gSjvOKiAT1oEui7gekUISnxrIAPchKGzsvF/hm5sLv/kHA+bKbt1Pl31lzPJPznD Yq+xD2FY+Yp2BaaBq+MAp6QmF1ZIWuLAe/ANwVqrOkz7hDQbTm15LEHDdncIseqMYdnn /Sdw== X-Gm-Message-State: AIkVDXL69mER/Fd+oxgXrssT/T7DoXHkshvYtpz0E0tot9Pa5WMM7f1cQqfEedf5M3F7Rw== X-Received: by 10.223.135.201 with SMTP id c9mr15407395wrc.139.1485718403988; Sun, 29 Jan 2017 11:33:23 -0800 (PST) Received: from ?IPv6:2a00:23c4:4bd2:6e00:1952:79fc:d4a0:8acd? ([2a00:23c4:4bd2:6e00:1952:79fc:d4a0:8acd]) by smtp.googlemail.com with ESMTPSA id i73sm15151444wmd.11.2017.01.29.11.33.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Jan 2017 11:33:22 -0800 (PST) To: PHP Internals Message-ID: <0c5fc86b-5050-fe73-7afa-b3e5a38ad370@gmail.com> Date: Sun, 29 Jan 2017 19:33:22 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [RFC] Deprecate and Remove Bareword (Unquoted) Strings From: rowan.collins@gmail.com (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]