Are PHP5 objects passed by reference?
- by morpheous
I cant seem to get any consistent info on this. Different sources appear to say different things and trhe venerable php.net iteslf (appears) not to explicitly state this - although I must admit, I only had a quick look.
In cases where I am passing around 'heavy' objects, I need to pass by reference, but I dont want to keep typing:
function foo(TypeName& $obj)
if I can get away with simply,
function foo(TypeName $obj)
So what does the standard say?