bug39775.phpt 416 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #39775 ("Indirect modification ..." message is not shown)
  3. --FILE--
  4. <?php
  5. class test {
  6. var $array = array();
  7. function __get($var) {
  8. $v =& $this->array;
  9. return $this->array;
  10. }
  11. }
  12. $t = new test;
  13. $t->anything[] = 'bar';
  14. print_r($t->anything);
  15. ?>
  16. --EXPECTF--
  17. Notice: Indirect modification of overloaded property test::$anything has no effect in %sbug39775.php on line 10
  18. Array
  19. (
  20. )