--TEST-- Attributes can be retrieved from trait constants --FILE-- getReflectionConstant('Constant')->getAttributes('TestAttribute')[0]->getArguments()['value']); $reflection = new \ReflectionClass(TestClass::class); var_dump($reflection->getReflectionConstant('Constant')->getAttributes('TestAttribute')[0]->getArguments()['value']); ?> --EXPECTF-- int(123) int(123)