Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70708 invoked from network); 31 May 2016 16:20:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2016 16:20:19 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.164 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.164 mx208.easyname.com Received: from [212.232.25.164] ([212.232.25.164:34021] helo=mx208.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/B9-26200-0C9BD475 for ; Tue, 31 May 2016 12:20:18 -0400 Received: from cable-81-173-133-15.netcologne.de ([81.173.133.15] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1b7mOh-0005SL-CI; Tue, 31 May 2016 16:20:03 +0000 Reply-To: internals@lists.php.net References: To: Dmitry Stogov , internals , Nikita Popov Message-ID: <1932f04f-c015-3956-a89c-8e96d2902e67@fleshgrinder.com> Date: Tue, 31 May 2016 18:19:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3BSVGkaRcxgpn5RcG09j51GlpMh9hQCOc" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable From: php@fleshgrinder.com (Fleshgrinder) --3BSVGkaRcxgpn5RcG09j51GlpMh9hQCOc Content-Type: multipart/mixed; boundary="nSV8aN2W7iRMuIMk6b9iKUean4Wa9jEsO" From: Fleshgrinder Reply-To: internals@lists.php.net To: Dmitry Stogov , internals , Nikita Popov Message-ID: <1932f04f-c015-3956-a89c-8e96d2902e67@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable References: In-Reply-To: --nSV8aN2W7iRMuIMk6b9iKUean4Wa9jEsO Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5/23/2016 10:24 PM, Dmitry Stogov wrote: > https://wiki.php.net/rfc/this_var >=20 Hi Dmitry, could you extend the RFC with an additional section that mentions to update corresponding manual pages, e.g.: https://secure.php.net/language.variables.basics There is a regular expression on that page that looks like the following and is often referred to by people explaining variable names in PHP: [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* I would propose to update this to the following more complete PCRE: /^\$?(?!this)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/D @nikic this is also important for your RFC regarding empty variable names because the PCRE would need to be updated once more too: /^\$?(?!this)[a-zA-Z_\x7f-\xff]?[a-zA-Z0-9_\x7f-\xff]*$/D Of course the sentence preceding the regular expression would also require an update. There might be more pages that I am not aware of but we could ask someone from the documentation team to help us here. The above one is definitely the most important one and it should imho be included in the R= FC. --=20 Richard "Fleshgrinder" Fussenegger --nSV8aN2W7iRMuIMk6b9iKUean4Wa9jEsO-- --3BSVGkaRcxgpn5RcG09j51GlpMh9hQCOc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXTbm0AAoJEOKkKcqFPVVrtz4P/j9rVWW85rwFurkudYljfacF eML6K+UT2I2J+J8v205RYG1zZ8fSzFtyBl/CRRmGUMFZpV1sSMvwGLFgEkJ/Wo6a y5Bmhnmx+R+dYD4A6HXkW9DQZMV4ssE8Nq6X2vkwJWRizS82BFRXjo33mqxqrWXy M/D/2E9zWHRjMDiRoaIjqS8AAqH7rvlZ/Islm8gfqX+ICmc4LWFjM3t/ZRfVX/mm pzFzwqqnK17g92EgcmIAhW+pVH4AYxdYJV5Xxu1T4zx4CYAwWTCqIXUw4ia9lD75 c+cetV5QbP/J5yom67cu9/Vp73eIkLzAyD7JGSnlp94cf1ih59AWJGPBBZy8u6C+ SEgXjZ0oJ2mnfT2Ry4iYXaZgDPh5D/B4xXDxvmfqJiTWgKDkICt/2qHA7Pp0HN1k L6MG9GC3xY8YLZbjeRRWk887kioCVlTVnjFiBSF93ZHvtcu/3l0pbYzF1HRVzri8 qQzsPOhMOavEBpl9N0+W7iqtvbgR4uqhiW5AiTXSRX9OIJRmXUs4vvxmS/ac90JL slC7omC1+TCmcUGlpF7OOyYADBx5mIKLlZoFohHe+gJNELP9kH11kFU/w59XWFlA LIBb3C2SKeWPifCuTyHaDwusr1ggKXzuU5yrWglwqtTNW42XR1WVRPeTJyXjOBVP R4LoZh1QyyCuClQFbQHL =LdA3 -----END PGP SIGNATURE----- --3BSVGkaRcxgpn5RcG09j51GlpMh9hQCOc--