3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = '<?xml version="1.0"?> <Rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Row Index="1"> <Email xsi:nil="true"/> </Row> </Rows>'; $dom = new DomDocument(); $dom->loadXml($xml); print $dom->getElementsByTagName('email')->item(0)->getAttribute('xsi:nil');
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to a member function getAttribute() on null in /in/ZfOrt:13 Stack trace: #0 {main} thrown in /in/ZfOrt on line 13
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Fatal error: Call to a member function getAttribute() on null in /in/ZfOrt on line 13
Process exited with code 255.
Output for 5.0.0 - 5.5.38
Fatal error: Call to a member function getAttribute() on a non-object in /in/ZfOrt on line 13
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/ZfOrt on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/ZfOrt on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ZfOrt on line 13
Process exited with code 255.