3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = simplexml_load_string('<html><meta http-equiv=\'Refresh\' content=\'0; url=/animation.php\'> </html>'); $result = $xml->xpath("//meta[@http-equiv='refresh']"); var_dump($result);
based on P9Zgi
Output for 7.0.20, 7.1.5 - 7.2.0
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 3 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 3 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 3 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 3 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 3 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 3 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/2BosQ:5 Stack trace: #0 {main} thrown in /in/2BosQ on line 5
Process exited with code 255.
Output for 7.0.6, 7.1.0
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/2BosQ:5 Stack trace: #0 {main} thrown in /in/2BosQ on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.5
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/2BosQ:5 Stack trace: #0 {main} thrown in /in/2BosQ on line 5
Process exited with code 255.
Output for 5.6.7 - 5.6.12, 5.6.21 - 5.6.28
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Fatal error: Call to a member function xpath() on boolean in /in/2BosQ on line 5
Process exited with code 255.
Output for 5.6.13 - 5.6.20
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Fatal error: Call to a member function xpath() on boolean in /in/2BosQ on line 5
Process exited with code 255.
Output for 5.3.18 - 5.5.28, 5.5.35
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Warning: simplexml_load_string(): </html> in /in/2BosQ on line 4 Warning: simplexml_load_string(): ^ in /in/2BosQ on line 4 Fatal error: Call to a member function xpath() on a non-object in /in/2BosQ on line 5
Process exited with code 255.
Output for 5.5.29 - 5.5.34
Warning: simplexml_load_string(): Entity: line 2: parser error : Opening and ending tag mismatch: meta line 1 and html in /in/2BosQ on line 4 Warning: simplexml_load_string(): Entity: line 2: parser error : Premature end of data in tag html line 1 in /in/2BosQ on line 4 Fatal error: Call to a member function xpath() on a non-object in /in/2BosQ on line 5
Process exited with code 255.