fork download
  1. <?php
  2.  
  3. class A {}
  4.  
  5. $a = new A;
  6. $b = $a;
  7. $c = clone $a;
  8. $d = new A;
  9.  
  10. var_dump($a, $b, $c, $d);
  11.  
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
object(A)#1 (0) {
}
object(A)#1 (0) {
}
object(A)#2 (0) {
}
object(A)#3 (0) {
}