Comparing Objects with == and ===
<?php class Employee { } $Bob = new Employee( ); $Joe = clone $Bob; print (int)($Bob == $Joe) . "\n"; print (int)($Joe === $Joe) . "\n"; class Employee { public function __construct( ) { $this->myself = $this; } } $Bob = new Employee( ); $Joe = clone $Bob; print (int)($Bob == $Joe) . "\n"; print (int)($Bob === $Joe) . "\n"; ?>