3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { private $x; } class C { use T; } $x=new \ReflectionClass(T::class); var_dump($x->getProperties());
Output for 7.4.33, 8.1.0 - 8.1.27, 8.2.0 - 8.2.16, 8.3.0 - 8.3.3
array(1) { [0]=> object(ReflectionProperty)#2 (2) { ["name"]=> string(1) "x" ["class"]=> string(1) "T" } }

preferences:
66.59 ms | 403 KiB | 55 Q