1--TEST-- 2Edge cases relating to reference source tracking 3--FILE-- 4<?php 5 6class A { 7 public int $prop = 42; 8} 9class B extends A { 10} 11 12$b = new B; 13$r =& $b->prop; 14unset($b); 15$r = "foo"; // ok 16 17class A2 { 18 private int $prop = 42; 19 20 public function &getRef() { 21 return $this->prop; 22 } 23} 24class B2 extends A2 { 25 public $prop; 26} 27 28$b2 = new B2; 29$r2 =& $b2->getRef(); 30unset($b2); 31$r2 = "foo"; // ok 32 33?> 34===DONE=== 35--EXPECT-- 36===DONE=== 37