1--TEST-- 2ReflectionObject::__toString() - ensure dynamic property with same name as inherited private property is shown. 3--FILE-- 4<?php 5class C { 6 private $p = 1; 7} 8 9#[AllowDynamicProperties] 10class D extends C{ 11} 12 13$Obj = new D; 14$Obj->p = 'value'; 15echo new ReflectionObject($Obj); 16?> 17--EXPECTF-- 18Object of class [ <user> class D extends C ] { 19 @@ %s 20 21 - Constants [0] { 22 } 23 24 - Static properties [0] { 25 } 26 27 - Static methods [0] { 28 } 29 30 - Properties [0] { 31 } 32 33 - Dynamic properties [0] { 34 } 35 36 - Methods [0] { 37 } 38} 39