The last() method retrieves the last node in the NodeList.
Description
public NodeList::last(): ?NodeInterface
Parameters
None
Return Value
Returns the last NodeInterface object in the NodeList if it exists; otherwise, null.
Exceptions
None