Is it necessary to use references in PHP5 for objects, or does PHP handle it automatically?

In PHP5, objects are passed by reference by default, meaning that references are not necessary when working with objects. PHP automatically handles passing objects by reference, so there is no need to explicitly use references in PHP5 for objects.

class MyClass {
    public $value;

    public function __construct($value) {
        $this->value = $value;
    }
}

$obj1 = new MyClass(5);
$obj2 = $obj1;

$obj2->value = 10;

echo $obj1->value; // Output: 10
echo $obj2->value; // Output: 10