On Sun, 7 Jul 2002, Anas Mughal wrote: > I have a general question about referencing... > > Would it be safe to reference a function return value?
Sure, unless the function returned a reference itself, in which case you have to continue keeping track of the validity of that reference (i.e., if its object gets unset(), I'm pretty sure it becomes invalid). If a function returns a scalar or array, it's recreated in the caller's context and will remain there until you explicitly get rid of it. It's not like C where strings are pointers whose contents can disappear out from under you at any moment. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php