Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56308 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89565 invoked from network); 13 Nov 2011 11:22:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2011 11:22:46 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:52619] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/C0-13342-488AFBE4 for ; Sun, 13 Nov 2011 06:22:45 -0500 Received: from [192.168.2.230] (ppp-93-104-50-208.dynamic.mnet-online.de [93.104.50.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 7D55C785B4; Sun, 13 Nov 2011 12:22:41 +0100 (CET) To: Antoine Delignat-Lavaud Cc: internals@lists.php.net In-Reply-To: <1321150216.1766.6.camel@guybrush> References: <4EBF1F70.5090700@ens-cachan.fr> <1321150216.1766.6.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Sun, 13 Nov 2011 12:22:36 +0100 Message-ID: <1321183356.2528.16.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [PATCH] Making in_array a language operator From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sun, 2011-11-13 at 03:10 +0100, Johannes Schlüter wrote: > For 5.5 I also have doubts whether it's worth the additional keyword and > opcode. Yes it will, most likely, but this is an extension to the > grammar ... I meanwhile did a quick check on google codesearch. I found a few cases where "in" was used as property or method name. Notable cases there are zeta components and doctrine2 which this patch would break. Two more comments I wanted to make: Your using is_equal_function, this does a == comparison. People will stumble over $a = 0; $a in ["a", "b", "c", "it's easy as one two three"]; which will be true. This is the consistent and correct behaviour for the language but people will ask for a "strict" mode. For converting functions into opcodes - aren't there more relevant candidates? strlen() or such come to mind. And no, I won't make them constructs either. johannes