PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/hphp/test/zend/good/ext/spl/tests/bug54971.php

http://github.com/facebook/hiphop-php
PHP | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | 83bebb68b852c831b3b7922431e3afbb MD5 | raw file
 1<?hh
 2<<__EntryPoint>> function main(): void {
 3$source = <<<XML
 4<root>
 5<node>val1</node>
 6<node>val2</node>
 7</root>
 8XML;
 9
10
11$doc = new DOMDocument();
12$doc->loadXML($source);
13
14$xpath = new DOMXPath($doc);
15$items = $xpath->query('//node');
16
17print_r(array_map('get_class', iterator_to_array($items, false)));
18print_r(array_map('get_class', iterator_to_array($items, true)));
19}