Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
function_seven
on Feb 28, 2013
|
parent
|
context
|
favorite
| on:
How PHP's foreach works
My own standard is this:
foreach ($array as & $ref) { // Do something with $ref } unset ($ref);
i.e. put the `unset()` call on the same line as the closing brace, forever "welding" it to that block.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: