phpday 2027 - Call for Papers

ReflectionAttribute::getArguments

(PHP 8)

ReflectionAttribute::getArguments — Gets the arguments passed to the attribute

Descrizione

public function ReflectionAttribute::getArguments(): array

Gets the arguments passed to the attribute.

The arguments are constant expressions and are evaluated when this method is called. Evaluating an argument may autoload a class referenced by the expression, for example through a class constant, an enum case, or an object created with new. Reading the arguments does not require the attribute class to exist or validate them against the constructor.

Elenco dei parametri

Questa funzione non ha parametri.

Valori restituiti

The arguments passed to the attribute, with integer keys for positional arguments and string keys for named arguments.

Errori/Eccezioni

If evaluating an argument throws an error or exception, it is propagated. This can happen when the argument references a class that cannot be loaded, or a constant that is not defined.

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top