Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nkozyra
on Feb 27, 2013
|
parent
|
context
|
favorite
| on:
How PHP's foreach works
So basically it operates on a copy unless it determines it doesn't need to?
I'm not sure why this is interesting.
wvenable
on Feb 27, 2013
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
I'm not sure why this is interesting.