interface AttributeNode (View source)

Parser-agnostic interface for attribute AST nodes.

Represents PHP 8.0+ attributes (e.g., #[AttributeName(...)])

Methods

string
getName()

Get the attribute name (e.g., "LanguageLevelTypeAware").

array
getArguments()

Get the attribute arguments.

Details

string getName()

Get the attribute name (e.g., "LanguageLevelTypeAware").

Return Value

string

array getArguments()

Get the attribute arguments.

Returns an associative array where keys are argument names (or numeric for positional args).

Return Value

array

Array of arguments, e.g., [0 => ['8.1' => 'string'], 'default' => '']