3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'. '<request><body test2="321" test3="987">'. '<rows><my-row test4="564">'. '<types>'. '<custom>this is the example of the text</custom>'. '<Generic arch="simple">this is the example of the text</Generic>'. '<bold/><italic/><underlined/>'. '</types>'. '</my-row><my-row test5="565"/><test hidden="false" ready="true"/></rows>'. '</body></request>'; $obj = new SimpleXmlIterator($s); function f($xml){ foreach ($obj as $key => $value) { var_dump($key, $value->hasChildren(), $value, '============='); if (get_class($value) == 'SimpleXMLIterator') f($v); } }
Output for 5.0.0 - 7.1.0
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: simplexmliterator in /in/bWvQ9 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: simplexmliterator in /in/bWvQ9 on line 12