DOMNode::hasAttributes

This method checks if the node has attributes

public function hasAttributes(): bool;

The tested node have to be an XML_ELEMENT_NODE.

Returns

  • bool - - Returns TRUE on success or FALSE on failure.