bug68262.phpt 293 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #68262: Broken reference across cloned objects
  3. --FILE--
  4. <?php
  5. class C {
  6. public $p;
  7. }
  8. $first = new C;
  9. $first->p = 'init';
  10. $clone = clone $first;
  11. $ref =& $first->p;
  12. unset($ref);
  13. $clone = clone $first;
  14. $clone->p = 'foo';
  15. var_dump($first->p);
  16. ?>
  17. --EXPECT--
  18. string(4) "init"