Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96948 invoked from network); 19 Sep 2015 18:28:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 18:28:42 -0000 X-Host-Fingerprint: 90.3.232.38 AAubervilliers-652-1-129-38.w90-3.abo.wanadoo.fr Received: from [90.3.232.38] ([90.3.232.38:15171] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/55-43089-759ADF55 for ; Sat, 19 Sep 2015 14:28:41 -0400 To: internals@lists.php.net Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: <55FBF7B7.4050603@lsces.co.uk> <55FC1A77.7090406@gmail.com> <55FC221A.7020108@lsces.co.uk> <55FC2588.6030809@gmail.com> <55FC2B17.3070909@lsces.co.uk> <55FC2F2F.9060403@gmail.com> <55FC33F1.3090903@lsces.co.uk> <55FC354B.5070209@gmail.com> <55FC39B2.5070005@lsces.co.uk> <55FC45C7.9010202@gmail.com> <55FC4991.1050903@lsces.co.uk> <7872E9F4-AE19-4681-B2EF-215751AE4CBE@thesba.com> <55FC5A14.8020301@gmail.com> <55FC988E.5000502@php.net> <4069D3FD-41BA-465B-89BE-670B677FA783@gmail.com> <55FD9EE1.7010202@php.net> Date: Sat, 19 Sep 2015 20:28:28 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/1.0 (Win32) X-Posted-By: 90.3.232.38 Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: bensor987@neuf.fr ("Benoit Schildknecht") Le Sat, 19 Sep 2015 19:44:01 +0200, "Fran=C3=A7ois Laupretre" = a =C3=A9crit: > Le 19/09/2015 14:25, Rowan Collins a =C3=A9crit : >> >> - a syntactic sugar for array_key_exists and property_exists, maybe = >> called hasitem(); hasitem($foo['bar']) would check $foo has the item = = >> 'bar', but hasitem($foo) would be an error > > The most important, IMO, is a more intuitive, readable alternative to = = > array_key_exists(). Checking the existence of a plain var is important= = > for completeness and should be available, but remains an edge case, an= d = > property_exists() seems sufficient. > > Anyway, the problem we have with names like 'exists' or 'hasitem', is = = > that they would become reserved names. So, they couldn't be used as = > function/method names anymore, creating an important BC break. > > Regards > > Fran=C3=A7ois What about the context sensitive lexer ? exists() would be reserved as a= = function name, but not more than that.