<?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());
?>
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 false in /in/1hPXT:6
Stack trace:
#0 {main}
thrown in /in/1hPXT on line 6
Process exited with code 255.
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 bool in /in/1hPXT:6
Stack trace:
#0 {main}
thrown in /in/1hPXT on line 6
Process exited with code 255.
Output for 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
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 bool in /in/1hPXT:6
Stack trace:
#0 {main}
thrown in /in/1hPXT on line 6
Process exited with code 255.
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 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.
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.0.5, 5.1.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.