The issue: In PHP 4 object orientation was a mess
<?php
// To reference an object
$object1 = &$object2;

function &
return_reference( &$object_to_modify )
{
    
// Code
}
?>
Everything was copied by default, to reference variables you needed &.
No interfaces, no abstract, no static, no scope model for methods and properties.
The solution: Always use PHP 5
<?php
$object1 
= new stdClass();
$object2 = clone $object1;
var_dump( ( $object1 === $object2) );
?>
Output
bool(false)