<?php class MyFoo { public function __construct( #[Inject('baz-value')] public readonly int $bar, ){} } $ref = new ReflectionClass(MyFoo::class); var_dump($ref->getConstructor()->getParameters()[0]->getAttributes()); var_dump($ref->getProperty('bar')->getAttributes());
You have javascript disabled. You will not be able to edit any code.