Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99565 invoked from network); 13 Nov 2011 13:31:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2011 13:31:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:54062] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/00-33584-F96CFBE4 for ; Sun, 13 Nov 2011 08:31:11 -0500 Received: by gyg13 with SMTP id 13so4719724gyg.29 for ; Sun, 13 Nov 2011 05:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=iPl1DD+PRtOm8L0HhPaV44gUFXCzItwrT5AEA6+CXEU=; b=xLdilAH30KzsO1sfOytJKURZr85Ci38V/mWuwgcg+zztfVyLQEKfp27kxisyJ0Oqd2 +b9Os7laBTGhYHvfLQreE/tVSqVQfyYaPSY+d0mT+TQxUh97aiXXUkUUehSxAvrXtTFn HXrwRO1IYttw4vT7g+Ans6OoWdJElwUX4Pq8s= MIME-Version: 1.0 Received: by 10.236.192.200 with SMTP id i48mr8139121yhn.125.1321190617613; Sun, 13 Nov 2011 05:23:37 -0800 (PST) Received: by 10.146.168.7 with HTTP; Sun, 13 Nov 2011 05:23:37 -0800 (PST) In-Reply-To: <1321183356.2528.16.camel@guybrush> References: <4EBF1F70.5090700@ens-cachan.fr> <1321150216.1766.6.camel@guybrush> <1321183356.2528.16.camel@guybrush> Date: Sun, 13 Nov 2011 14:23:37 +0100 Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: Antoine Delignat-Lavaud , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] Making in_array a language operator From: pierre.php@gmail.com (Pierre Joye) 2011/11/13 Johannes Schl=FCter : > On Sun, 2011-11-13 at 03:10 +0100, Johannes Schl=FCter 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. Right, that would be a BC break for method names. Properties work just fine (and now already with for, while &co if you try). > 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. There is an idea to have pseudo object for common types, where these functions would be callable without actually having an instance. No implementation yet so far. Cheers, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org