Hi Mike,

> On 20 Jan 2015, at 03:30, Mike Willbanks <pen...@gmail.com> wrote:
> 
> I am very familiar with the in operator.  However,  the implementation
> would be incomplete without handling loops via the in operator.  Many
> people when seeing an in operator also think of JavaScript.  In that case
> the in operator iterates over properties.  As such in PHP we should be able
> to iterate over associative arrays should the syntax be added.
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in

Why? We already have foreach/as which does exactly that, and unlike JS which 
added for/of, there’s nothing wrong with PHP’s foreach so we don’t need support 
for a new symbol.

--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to