/hphp/test/zend/good/ext/spl/tests/bug54971.php
PHP | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | 83bebb68b852c831b3b7922431e3afbb MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh
- <<__EntryPoint>> function main(): void {
- $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)));
- }