Re: [PATCH] Making in_array a language operator
| From: | Pierre Joye | Date: | Sun, 13 Nov 2011 13:23:37 +0000 |
| Subject: | Re: [PATCH] Making in_array a language operator | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56310@lists.php.net to get a copy of this message | ||
2011/11/13 Johannes Schlüter <johannes@schlueters.de>:
> 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.
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,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org