in a situation like that below,
class my_class {
public __construct($params = array()){
**** do something
}
}
$other_object = new some_class();
$object = new my_class(array(
'var1' => 'test'
'object' => $other_object));
$other_object will be passed by reference or by value?
Objects are always references, except you
cloneit explicitly.You can use
spl_object_hash()to retrieve the “object id” and then compare them against each other. Remember, that once an object is removed from the memory by the garbage collector, the ID may get reused.