Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-26 Thread Niklas Keller
2015-02-21 1:45 GMT+01:00 Niklas Keller : > 2015-02-21 1:07 GMT+01:00 Pádraic Brady : >> On 20 February 2015 at 23:38, Larry Garfield >> wrote: >>> While I love the idea, strict type comparison for in would, in essence, >>> be a >>> toe-dip into the scalar strict typing world (see other thread) th

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Niklas Keller
2015-02-21 1:07 GMT+01:00 Pádraic Brady : > On 20 February 2015 at 23:38, Larry Garfield wrote: >> While I love the idea, strict type comparison for in would, in essence, be a >> toe-dip into the scalar strict typing world (see other thread) that would be >> very confusing. Consider: >> >> if (3

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Pádraic Brady
On 20 February 2015 at 23:38, Larry Garfield wrote: > While I love the idea, strict type comparison for in would, in essence, be a > toe-dip into the scalar strict typing world (see other thread) that would be > very confusing. Consider: > > if (3 in $_GET['filters']) { ... } > > That would alway

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Larry Garfield
On 02/20/2015 07:54 AM, Niklas Keller wrote: Hi internals, "In Operator" is now in discussion phase. This RFC adds a new in operator which simplifies contains checks for strings and arrays. Currently, we have to usein_array($needle, $haystack, true) or strpos($haystack, $needle) !== false. T

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Niklas Keller
2015-02-20 19:48 GMT+01:00 Markus Fischer : > On 20.02.15 18:16, Dan Ackroyd wrote: >> On 20 February 2015 at 12:54, Niklas Keller wrote: >>> Hi internals, >>> >>> It would really make sense to vote on this RFC after there has been a >>> vote on https://wiki.php.net/rfc/context_sensitive_lexer. >>

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Markus Fischer
On 20.02.15 18:16, Dan Ackroyd wrote: > On 20 February 2015 at 12:54, Niklas Keller wrote: >> Hi internals, >> >> It would really make sense to vote on this RFC after there has been a >> vote on https://wiki.php.net/rfc/context_sensitive_lexer. > > That is an understatement: > https://github.com/

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Dan Ackroyd
On 20 February 2015 at 12:54, Niklas Keller wrote: > Hi internals, > > It would really make sense to vote on this RFC after there has been a > vote on https://wiki.php.net/rfc/context_sensitive_lexer. That is an understatement: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Qu

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Pádraic Brady
On 20 February 2015 at 15:55, Johannes Schlüter wrote: > On Fri, 2015-02-20 at 13:54 +0100, Niklas Keller wrote: >> Hi internals, >> >> "In Operator" is now in discussion phase. >> >> > This RFC adds a new in operator which simplifies contains checks for >> > strings and arrays. >> > Currently, w

Re: [PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Johannes Schlüter
On Fri, 2015-02-20 at 13:54 +0100, Niklas Keller wrote: > Hi internals, > > "In Operator" is now in discussion phase. > > > This RFC adds a new in operator which simplifies contains checks for > > strings and arrays. > > Currently, we have to usein_array($needle, $haystack, true) or > > strpos(

[PHP-DEV] [RFC][Discussion] In Operator

2015-02-20 Thread Niklas Keller
Hi internals, "In Operator" is now in discussion phase. > This RFC adds a new in operator which simplifies contains checks for strings > and arrays. > Currently, we have to usein_array($needle, $haystack, true) or > strpos($haystack, $needle) !== false. > These functions have a inconsistent par