How can I iterate through a DOMNodeList in reverse direction?

I try to iterate through a DOMNodeList, but it is the wrong direction:

$xml_document = new DomDocument(); 
$elements = $xml_document->getElementsByTagName('response');

foreach ($elements as $key => $element) {
    $childNode = $element->childNodes[0]->nodeValue;

I found a solution for reversing with "for":


But I actually I need foreach, because I need access to the key and value.