bug43505.phpt 481 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Bug #43505 (Assign by reference bug)
  3. --INI--
  4. error_reporting=0
  5. --SKIPIF--
  6. <?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?>
  7. --FILE--
  8. <?php
  9. class Test implements Countable {
  10. public function count() {
  11. return $some;
  12. }
  13. }
  14. $obj = new Test();
  15. $a = array();
  16. $b =& $a['test'];
  17. var_dump($a);
  18. $t = count($obj);
  19. $a = array();
  20. $b =& $a['test'];
  21. var_dump($a);
  22. ?>
  23. --EXPECT--
  24. array(1) {
  25. ["test"]=>
  26. &NULL
  27. }
  28. array(1) {
  29. ["test"]=>
  30. &NULL
  31. }