<?php #[\Attribute(\Attribute::TARGET_FUNCTION)] class TaggedLocator{} class User { public function __construct ( #[TaggedLocator] private int $test, ) { } } $r = new ReflectionClass(User::class); var_dump($r->getMethod('__construct')->getParameters()[0]->getAttributes()[0]->getName()); var_dump($r->getProperties());
You have javascript disabled. You will not be able to edit any code.