The indexOf()
method returns the index of the specified node in the NodeList
. If the node is not found, it returns false
.
Description
public NodeList::indexOf(NodeInterface $node): int|bool
Parameters
node
The node to search for in the NodeList
.
Return Value
Returns the index of the node if it is found, or false
if the node is not present in the NodeList
.
Exceptions
None