View Single Post
Old 03-01-2009, 09:11 PM   #7 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Some functions, like array_pop as you mentioned, pass some arguments by reference. Examples include array_pop and array_walk whose first arguments (the array to work on) are passed by reference.

As for =& $var versus = &$var, that's up to personal preference. Me, I like to think of it as "assign by reference" not "assign a reference" so would go with =& usually.
Salathe is offline  
Reply With Quote