bug48248.phpt 409 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #48248 (SIGSEGV when access to private property via &__get)
  3. --FILE--
  4. <?php
  5. class A
  6. {
  7. public function & __get($name)
  8. {
  9. return $this->test;
  10. }
  11. }
  12. class B extends A
  13. {
  14. private $test;
  15. }
  16. $b = new B;
  17. var_dump($b->test);
  18. ?>
  19. --EXPECTF--
  20. Notice: Undefined property: B::$test in %s on line %d
  21. Notice: Only variable references should be returned by reference in %s on line %d
  22. NULL