Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106145 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93608 invoked from network); 5 Jul 2019 01:03:49 -0000 Received: from unknown (HELO v-smtpout2.han.skanova.net) (81.236.60.155) by pb1.pair.com with SMTP; 5 Jul 2019 01:03:49 -0000 Received: from [192.168.7.8] ([213.64.245.126]) by cmsmtp with ESMTPA id jA7NhjNV6UYHfjA7NhBNq9; Fri, 05 Jul 2019 00:22:18 +0200 To: Claude Pache , Nikita Popov Cc: Levi Morrison , Andrew Gromov , PHP internals References: <1562149108.866677.18420.33348@mail.rambler.ru> <43EE0CF8-B66E-4ED4-8B1B-418BA0751505@gmail.com> Message-ID: <19552b05-02cd-e3b4-1cd7-254fe372aad2@telia.com> Date: Fri, 5 Jul 2019 00:22:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <43EE0CF8-B66E-4ED4-8B1B-418BA0751505@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-CMAE-Envelope: MS4wfMPniwuzhLLyR6kW5QKmg9tpvbggO12GKydS5ktDpd3WBpe36Wc8s0TYFPsxssJppjsSrV17bvl+YynkyJy7KbWt4WeGDHa4EVN2M82RjnksFrrwPaCt 4ChIgKRcAXdkp1AIpROT4iqFIs3ItHq5lTh3Xl5EKkhoHhKXvn0UU2w5vTBFsK7OMPWTxLui6jXmjie7j/PkmzbJJI53WqqoWCAVmfB1m7Wy39yqBpJvGVFX 22hcBRTyiz0I9iOvVO9nFYswSQFKlRxmew7uFQrahr+AWIB/9z/fDz6nQjBuCNC38zmJ56zzDrnhUJeO1z8ohQ== Subject: Re: [PHP-DEV] [RFC][VOTE] Deprecate curly brace syntax for accessing array elements and string offsets From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2019-07-03 kl. 19:22, skrev Claude Pache: > >> Le 3 juil. 2019 à 17:59, Nikita Popov a écrit : >> >> On Wed, Jul 3, 2019 at 4:41 PM Levi Morrison wrote: >> >>> Was any analysis of usage done for top open source projects? I support >>> this direction, but would prefer to know its current impact before >>> voting. >>> >> I checked top 2k projects with a 2-3 months outdated data set. Here is the >> analysis log: https://gist.github.com/nikic/b5f811e0423bf051f4492cd6e0c0273e >> >> Overall there were ~2.2k individual uses of alternative array syntax. To >> put that into context, there 888.3k total array accesses in the data set, >> which puts usage at about 0.25%. Uses are usually clustered, i.e. if >> alternative array syntax is used in a file, it will be used many times. >> >> Nikita > It ought to be noted that the alternative syntax is used essentially for strings, not for arrays proper. In fact, I expect that it is used almost exclusively for strings. > > That means, most probably: ~2.2k uses of alternative syntax for direct byte access in strings among 888.3k for byte access in strings AND direct element access in arrays. > > —Claude Hi, Would it be possible to compare the string access only for both curly & straight braces and the same for array access? r//Björn L