- Output for 7.4.33, 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
- array(1) { [0]=> object(ReflectionProperty)#2 (2) { ["name"]=> string(1) "x" ["class"]=> string(1) "T" } }
<?php
trait T
{
private $x;
}
class C
{
use T;
}
$x=new \ReflectionClass(T::class);
var_dump($x->getProperties());