php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/php-7.0.1/ext/spl/tests/ |
files >> //opt/php-7.0.1/ext/spl/tests/bug54971.phpt |
--TEST-- Bug #54971 (Wrong result when using iterator_to_array with use_keys on true) --SKIPIF-- <?php if (!extension_loaded('dom')) die("skip this test needs --enable-dom"); ?> --FILE-- <?php $source = <<<XML <root> <node>val1</node> <node>val2</node> </root> XML; $doc = new DOMDocument(); $doc->loadXML($source); $xpath = new DOMXPath($doc); $items = $xpath->query('//node'); print_r(array_map('get_class', iterator_to_array($items, false))); print_r(array_map('get_class', iterator_to_array($items, true))); ?> --EXPECT-- Array ( [0] => DOMElement [1] => DOMElement ) Array ( [0] => DOMElement [1] => DOMElement )y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`