News for hackers. Stuff that matters.
Re:How PHP's foreach works by nkozyra on Wednesday February 27, 2013 @06:14PM (#5295716)
So basically it operates on a copy unless it determines it doesn't need to?

I'm not sure why this is interesting.

Re:How PHP's foreach works by wvenable on Wednesday February 27, 2013 @06:27PM (#5295793)
It's even less interesting because PHP arrays have value semantics so someFunc($array) and foreach($array..) aren't really that different. The whole thing is pretty intuitive.

The answer to the question is pretty deep though.