3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 8.3.0 - 8.3.4
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 false in /in/2BosQ:5 Stack trace: #0 {main} thrown in /in/2BosQ on line 5
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
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 bool in /in/2BosQ:5 Stack trace: #0 {main} thrown in /in/2BosQ on line 5
Process exited with code 255.
Output for 7.0.20, 7.1.5 - 7.1.20, 7.2.0 - 7.2.33
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.4.2 - 5.4.45, 5.5.24 - 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.

preferences:
197.14 ms | 401 KiB | 223 Q