bug70332.phpt 323 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #70332 (Wrong behavior while returning reference on object)
  3. --FILE--
  4. <?php
  5. function & test($arg) {
  6. return $arg;
  7. }
  8. $arg = new Stdclass();
  9. $arg->name = array();
  10. test($arg)->name[1] = "xxxx";
  11. print_r($arg);
  12. ?>
  13. --EXPECT--
  14. stdClass Object
  15. (
  16. [name] => Array
  17. (
  18. [1] => xxxx
  19. )
  20. )