1--TEST-- 2ReflectionClass::__toString() - ensure inherited private props are hidden. 3--FILE-- 4<?php 5Class c { 6 private $a; 7 static private $b; 8 public ?int $c = 42; 9 public Foo $d; 10} 11 12class d extends c {} 13 14echo new ReflectionClass("c"), "\n"; 15echo new ReflectionClass("d"), "\n"; 16?> 17--EXPECTF-- 18Class [ <user> class c ] { 19 @@ %s 2-7 20 21 - Constants [0] { 22 } 23 24 - Static properties [1] { 25 Property [ private static $b = NULL ] 26 } 27 28 - Static methods [0] { 29 } 30 31 - Properties [3] { 32 Property [ private $a = NULL ] 33 Property [ public ?int $c = 42 ] 34 Property [ public Foo $d ] 35 } 36 37 - Methods [0] { 38 } 39} 40 41Class [ <user> class d extends c ] { 42 @@ %s 9-9 43 44 - Constants [0] { 45 } 46 47 - Static properties [0] { 48 } 49 50 - Static methods [0] { 51 } 52 53 - Properties [2] { 54 Property [ public ?int $c = 42 ] 55 Property [ public Foo $d ] 56 } 57 58 - Methods [0] { 59 } 60} 61