- var_dump: documentation ( source)
<?php
namespace Somebody\Something;
#[ Foo( Foo::class ) ]
class Whatever {}
$reflector = new \ReflectionClass(Whatever::class);
$attributes = $reflector->getAttributes();
var_dump($attributes[0]->getName(), $attributes[0]->getArguments());