=& Question
Posted: Fri Sep 28, 2007 9:39 am
Hey,
In PHP 5 we have no longer have to put "&" after = to use reference right ? cause by defaut php 5 do not make copy of object right ?
If I do this
the $obj will content the reference of the object
why this code do a copy of the object instead of copy the reference ?
$a["test"] is a copy of MyClass and not reference, why i have to specify =& to get the reference ?
thanks.
In PHP 5 we have no longer have to put "&" after = to use reference right ? cause by defaut php 5 do not make copy of object right ?
If I do this
Code: Select all
$obj = new MyClass();why this code do a copy of the object instead of copy the reference ?
Code: Select all
$a = array();
$a["test"] = new MyClass();thanks.