3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} #[Foo] class Bar {} $reflection = new ReflectionClass(Bar::class); var_dump( $attr = $reflection->getAttributes(), $attr[0]->getName(), $attr[0]->getTarget(), );

preferences:
30.29 ms | 404 KiB | 5 Q