1--TEST-- 2Unsetting typed properties containing a reference must respect shadowing 3--FILE-- 4<?php 5 6class A { 7 private int $prop = 42; 8 9 public function test() { 10 $x =& $this->prop; 11 unset($this->prop); 12 $x = "foo"; 13 var_dump($x); 14 } 15} 16class B extends A { 17 private $prop; 18} 19 20$b = new B; 21$b->test(); 22 23?> 24--EXPECT-- 25string(3) "foo" 26