3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TraitWithProperties { private $a = 'foo'; protected $b = 'bar'; public $c = 'baz'; private static $as = self::class; protected static $bs = __TRAIT__; public static $cs = __CLASS__; } class SimpleClassWithTrait { use TraitWithProperties; } $refClass = new ReflectionClass('TraitWithProperties'); var_dump($refClass->getStaticProperties());

preferences:
54.51 ms | 402 KiB | 5 Q