3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = <<<XML <?xml version="1.0"?> <rootElem vla/> XML; libxml_use_internal_errors(true); $reader = new XMLReader(); $reader->xml($xml); $reader->read(); print_r(libxml_get_errors());
Output for 5.4.22 - 5.4.45, 5.5.5 - 7.1.0
Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 41 [column] => 14 [message] => Specification mandate value for attribute vla [file] => / [line] => 2 ) )
Output for 5.4.17 - 5.4.21, 5.5.0 - 5.5.4
Warning: XMLReader::read(): An Error Occurred while reading in /in/SeRvE on line 13 Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 41 [column] => 14 [message] => Specification mandate value for attribute vla [file] => / [line] => 2 ) )
Output for 5.2.3 - 5.4.16
Warning: XMLReader::read(): An Error Occured while reading in /in/SeRvE on line 13 Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 41 [column] => 14 [message] => Specification mandate value for attribute vla [file] => / [line] => 2 ) )
Output for 5.1.3 - 5.2.2
<br /> <b>Warning</b>: XMLReader::read() [<a href='function.XMLReader-read'>function.XMLReader-read</a>]: An Error Occured while reading in <b>/in/SeRvE</b> on line <b>13</b><br /> Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 41 [column] => 14 [message] => Specification mandate value for attribute vla [file] => /in/ [line] => 2 ) )
Output for 5.1.2
<br /> <b>Warning</b>: XMLReader::read() [<a href='function.read'>function.read</a>]: An Error Occured while reading in <b>/in/SeRvE</b> on line <b>14</b><br /> Array ( [0] => LibXMLError Object ( [level] => 3 [code] => 41 [column] => 14 [message] => Specification mandate value for attribute vla [file] => /in/ [line] => 2 ) )
Output for 5.1.0 - 5.1.1
<br /> <b>Fatal error</b>: Class 'XMLReader' not found in <b>/in/SeRvE</b> on line <b>10</b><br />
Process exited with code 255.
Output for 5.0.0 - 5.0.5
<br /> <b>Fatal error</b>: Call to undefined function libxml_use_internal_errors() in <b>/in/SeRvE</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: libxml_use_internal_errors() in <b>/in/SeRvE</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: libxml_use_internal_errors() in <b>/in/SeRvE</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.4.2
<br /> <b>Fatal error</b>: Call to undefined function: libxml_use_internal_errors() in <b>/in/SeRvE</b> on line <b>9</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: libxml_use_internal_errors() in <b>/in/SeRvE</b> on line <b>8</b><br />