3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = <<<XML <?xml version="1.0"?> <rootElem> XML; //libxml_use_internal_errors(true); $reader = new XMLReader(); //$reader->xml($xml, null, LIBXML_NOERROR | LIBXML_NOWARNING); $reader->xml($xml); $reader->read();
Output for 5.5.24 - 5.5.28, 5.5.35 - 5.6.12, 5.6.21 - 5.6.28, 7.0.6 - 7.1.0
Warning: XMLReader::read(): /:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 13 Warning: XMLReader::read(): <rootElem> in /in/kK3Wl on line 13 Warning: XMLReader::read(): ^ in /in/kK3Wl on line 13
Output for 5.4.22 - 5.4.45, 5.5.29 - 5.5.34, 5.6.13 - 5.6.20, 7.0.0 - 7.0.5
Warning: XMLReader::read(): /:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 13
Output for 5.4.17 - 5.4.21
Warning: XMLReader::read(): /:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 13 Warning: XMLReader::read(): An Error Occurred while reading in /in/kK3Wl on line 13
Output for 5.2.3 - 5.4.16
Warning: XMLReader::read(): /:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 13 Warning: XMLReader::read(): An Error Occured while reading in /in/kK3Wl on line 13
Output for 5.1.3 - 5.2.2
Warning: XMLReader::read(): /in/:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 13 Warning: XMLReader::read(): An Error Occured while reading in /in/kK3Wl on line 13
Output for 5.1.2
Warning: XMLReader::read(): /in/:2: parser error : Extra content at the end of the document in /in/kK3Wl on line 14 Warning: XMLReader::read(): An Error Occured while reading in /in/kK3Wl on line 14
Output for 5.0.0 - 5.1.1
Fatal error: Class 'XMLReader' not found in /in/kK3Wl on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.9
Fatal error: Cannot instantiate non-existent class: xmlreader in /in/kK3Wl on line 9
Process exited with code 255.
Output for 4.4.2
Fatal error: Cannot instantiate non-existent class: xmlreader in /in/kK3Wl on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: xmlreader in /in/kK3Wl on line 9