Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88376 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93705 invoked from network); 19 Sep 2015 17:44:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 17:44:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.6 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.6 smtp6-g21.free.fr Received: from [212.27.42.6] ([212.27.42.6:51279] helo=smtp6-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/E4-43089-AEE9DF55 for ; Sat, 19 Sep 2015 13:44:11 -0400 Received: from [127.0.0.1] (unknown [82.232.41.54]) (Authenticated sender: flaupretre@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 52BC98226E; Sat, 19 Sep 2015 19:36:17 +0200 (CEST) To: Rowan Collins , Benoit Schildknecht , internals@lists.php.net Cc: Robert Williams References: <55FB3A60.1040601@gmail.com> <55FB4270.7000204@lsces.co.uk> <55FB4969.7080600@gmail.com> <55FB5BA6.6050606@lsces.co.uk> <55FBF265.5000502@gmail.com> <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> Message-ID: <55FD9EE1.7010202@php.net> Date: Sat, 19 Sep 2015 19:44:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <4069D3FD-41BA-465B-89BE-670B677FA783@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 150919-0, 19/09/2015), Outbound message X-Antivirus-Status: Clean Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: francois@php.net (=?UTF-8?Q?Fran=c3=a7ois_Laupretre?=) Le 19/09/2015 14:25, Rowan Collins a écrit : > > - 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, and 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çois