3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = XMLReader::open('test.xml'); // The validate parser option must be enabled for // this method to work properly $xml->setParserProperty(XMLReader::VALIDATE, true); var_dump($xml->isValid()); ?>
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method XMLReader::open() should not be called statically in /in/1hPXT on line 2 Warning: XMLReader::open(): Unable to open source data in /in/1hPXT on line 2 Fatal error: Uncaught Error: Call to a member function setParserProperty() on boolean in /in/1hPXT:6 Stack trace: #0 {main} thrown in /in/1hPXT on line 6
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Non-static method XMLReader::open() cannot be called statically in /in/1hPXT on line -1
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Non-static method XMLReader::open() cannot be called statically in /in/1hPXT on line 2
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Strict Standards: Non-static method XMLReader::open() should not be called statically in /in/1hPXT on line 2 Warning: XMLReader::open(): Unable to open source data in /in/1hPXT on line 2 Fatal error: Call to a member function setParserProperty() on boolean in /in/1hPXT on line 6
Process exited with code 255.
Output for 5.1.2 - 5.5.35
Strict Standards: Non-static method XMLReader::open() should not be called statically in /in/1hPXT on line 2 Warning: XMLReader::open(): Unable to open source data in /in/1hPXT on line 2 Fatal error: Call to a member function setParserProperty() on a non-object in /in/1hPXT on line 6
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'XMLReader' not found in /in/1hPXT on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ',', expecting '(' in /in/1hPXT on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ',', expecting '(' in /in/1hPXT on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/1hPXT on line 6
Process exited with code 255.