Re:PHP: The Right Way
by wvenable on Saturday July 07, 2012 @06:15PM
(#4212903)
The result is 100% logical. My own personal guideline is to never use references anywhere; even in a foreach loop you can use the key to modify the original array instead of a reference to the value.
[ Parent
| on HN ]
References have their uses, but they are not the simplest concept. For people that think references are like C pointers it is indeed better and safer to never use them. For the rest of people, in about 90% of cases you think you need them you actually don't. But the remaining 10% is still there.