Manual
API
hasAttribute ( string $name ) : bool
name
Returns true if the current node has an attribute with the specified name.