Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88373 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75929 invoked from network); 19 Sep 2015 12:29:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 12:29:09 -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 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:36584] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/13-43089-5155DF55 for ; Sat, 19 Sep 2015 08:29:09 -0400 Received: by wicgb1 with SMTP id gb1so61858007wic.1 for ; Sat, 19 Sep 2015 05:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; bh=eQuhXa8aiXRPYkzSVoWfcfTD/XGVDJrnpHk/0aB5fcU=; b=Wn0pKjA9WJmgWkG0an+F9LKEICi1ghbUN2MHCS0ZCdSau/OS5kLk6vmXPtAp4SfPai kzwpM0AZh90Fynpn9xH8VWbMifyjOvg9Lcp4Rhu0IEbPIAhiAKygPdoF/z8drc+m3HHv GBdYb5W/uXWZGtkzvR7SH69r8yty6CQhrYt22Op+chiE6FntB5XMPJ6sLNZtQqwhRxrJ R00YbiRmCVjnDLH+w37U+WHp7mNEpqSltxlwiAGD0ai6i2sRU1jpZRb8ZsxDa/4a2Hj3 5rWm7DYBvpael/TDw+tZPqR4nI9Vm7co/ZuF/Dhn7Ibp8l83WUOLRqtMKerUCBWpHUql DptQ== X-Received: by 10.194.103.130 with SMTP id fw2mr14215730wjb.121.1442665745166; Sat, 19 Sep 2015 05:29:05 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by smtp.gmail.com with ESMTPSA id uo6sm13824734wjc.1.2015.09.19.05.29.04 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Sep 2015 05:29:04 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <55FC988E.5000502@php.net> 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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sat, 19 Sep 2015 13:25:31 +0100 To: =?ISO-8859-1?Q?Fran=E7ois_Laupretre?= ,Benoit Schildknecht ,internals@lists.php.net CC: Robert Williams Message-ID: <4069D3FD-41BA-465B-89BE-670B677FA783@gmail.com> Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: rowan.collins@gmail.com (Rowan Collins) On 19 September 2015 00:04:46 BST, "François Laupretre" wrote: >So, as everyone seems to have exposed his arguments, I think we need an >RFC and a patch now. Unless anyone volunteers, I'll write the patch. >Who >can write the RFC ? Robert ? I may have given the impression of stubbornness in this discussion, but I have listened to people's arguments, and am considering an RFC proposing two functions: - 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 - a function for checking if a variable is in the current symbol table, maybe called variable_exists to match class_exists etc; it would take a string naming the variable, e.g. variable_exists('foo'); I am worried that this will be abused, and tempted to give it a "scarier" name Importantly, neither of these should be presented as "fixing isset", since I have seen absolutely zero evidence that it is broken; the names and behaviours are designed to highlight that these are functions to be used for specific purposes. Regards, -- Rowan Collins [IMSoP]