Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-19 Thread Patrick ALLAERT
Hey, Le dim. 15 mars 2015 à 01:54, Niklas Keller m...@kelunik.com a écrit : Morning, I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator There was a small change: If the haystack is a string,

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-16 Thread Eli
On 3/15/15 11:05 PM, Yasuo Ohgaki wrote: Hi all, On Mon, Mar 16, 2015 at 11:50 AM, Eli e...@eliw.com wrote: Currently, I can speak for myself, I almost always find myself doing a 'backup' step in coding. Because in this situation my process becomes: if ($zebra ... Oh wait, can't do that,

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-16 Thread Eli
On 3/16/15 2:21 AM, Stanislav Malyshev wrote: if ($zebra in $zoo) {} Two things here: 1. If you're looking whether your zoo has a zebra, and you're doing it by inspecting every inch of your zoo and checking if it doesn't contain a zebra by any chance, you're running your zoo wrong. I hope

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-16 Thread Mike Willbanks
On Sun, Mar 15, 2015 at 10:07 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Netroby, On Mon, Mar 16, 2015 at 12:03 PM, Netroby hufeng1...@gmail.com wrote: Does the in support this kind of php code ? ```php ?php $arr = ['a', 'b', 'c']; for ($v in $arr) { echo $v; }

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-16 Thread Stanislav Malyshev
Hi! But I'd like to know from your POV: Does this harm anything? Depends on what you see as harm. Complicating the language is kind of harm. Introducing stuff that promotes patterns that are not always best, and that do a bit too much, and look too much like something in different languages

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Dan Ackroyd
On 15 March 2015 at 00:54, Niklas Keller m...@kelunik.com wrote: Morning, I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator We've discussed this elsewhere and the RFC is still lacking one thing -

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Niklas Keller
2015-03-15 3:34 GMT+01:00 Stanislav Malyshev smalys...@gmail.com: Hi! I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator I think this operator is unnecessary - we already have perfectly good

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Stanislav Malyshev
Hi! I think this operator is unnecessary - we already have perfectly good function that does the same. If they were perfectly good, ... I think you forgot to finish your argument here. a set of values. Since efficient implementation of the set in PHP would have the value being sought as

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Eli
On 3/14/15 10:34 PM, Stanislav Malyshev wrote: Hi! I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator I think this operator is unnecessary - we already have perfectly good function that does the

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Netroby
Does the in support this kind of php code ? ```php ?php $arr = ['a', 'b', 'c']; for ($v in $arr) { echo $v; } ``` I know javascript has this kind of support https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in Appreciate your time.

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Yasuo Ohgaki
Hi Netroby, On Mon, Mar 16, 2015 at 12:03 PM, Netroby hufeng1...@gmail.com wrote: Does the in support this kind of php code ? ```php ?php $arr = ['a', 'b', 'c']; for ($v in $arr) { echo $v; } ``` I know javascript has this kind of support

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-15 Thread Yasuo Ohgaki
Hi all, On Mon, Mar 16, 2015 at 11:50 AM, Eli e...@eliw.com wrote: On 3/14/15 10:34 PM, Stanislav Malyshev wrote: Hi! I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator I think this

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-14 Thread Niklas Keller
2015-03-15 2:48 GMT+01:00 Antonio Carlos Ribeiro a...@antoniocarlosribeiro.com: Niklas, I have to thank you for creating this RFC, I simply love it, every time I have to use in_array() I feel PHP misses an in operator. I cannot vote, but you have my spiritual support :) Thanks for your

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-14 Thread Yasuo Ohgaki
Hi Niklas, On Sun, Mar 15, 2015 at 9:54 AM, Niklas Keller m...@kelunik.com wrote: I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator There was a small change: If the haystack is a string, integers

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-14 Thread Stanislav Malyshev
Hi! I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator I think this operator is unnecessary - we already have perfectly good function that does the same. Also, since it checks the values and not the

Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-14 Thread Antonio Carlos Ribeiro
Niklas, I have to thank you for creating this RFC, I simply love it, every time I have to use in_array() I feel PHP misses an in operator. I cannot vote, but you have my spiritual support :) Antonio Carlos Ribeiro a...@antoniocarlosribeiro.com (+55) 21-9-8088-2233 (celular TIM) (+55)

[PHP-DEV] [RFC][PRE-VOTE] In Operator

2015-03-14 Thread Niklas Keller
Morning, I'd like to announce that I'll open the vote for the in operator later that day. You can find the RFC here: https://wiki.php.net/rfc/in_operator There was a small change: If the haystack is a string, integers are no longer allowed as needle. This change was necessary so it's