<?php #[Attribute(Attribute::TARGET_CLASS)] class AttributeForClasses { } #[NonexistentAttribute] #[AttributeForClasses] function doFoo(): void { } // uncomment for errors /*$r = new ReflectionFunction('doFoo'); foreach ($r->getAttributes() as $ra) { try { $ra->newInstance(); } catch (\Throwable $e) { echo $e->getMessage() . "\n"; } }*/
You have javascript disabled. You will not be able to edit any code.