3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml="<root><node1>content</node1></root>"; $sxe=new simpleXMLElement($xml); $xml="<root><node1>content</node1></root>"; $sxe=simplexml_load_string($xml); $sxe=simplexml_load_file("filename.xml"); print $sxe->asXML();
Output for 7.3.0alpha1 - 7.3.0rc4
Warning: simplexml_load_file(): I/O warning : failed to load external entity "filename.xml" in /in/AkWBZ on line 8 Fatal error: Uncaught Error: Call to a member function asXML() on bool in /in/AkWBZ:10 Stack trace: #0 {main} thrown in /in/AkWBZ on line 10
Process exited with code 255.
Output for 7.0.0 - 7.2.6
Warning: simplexml_load_file(): I/O warning : failed to load external entity "filename.xml" in /in/AkWBZ on line 8 Fatal error: Uncaught Error: Call to a member function asXML() on boolean in /in/AkWBZ:10 Stack trace: #0 {main} thrown in /in/AkWBZ on line 10
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_file(): I/O warning : failed to load external entity "filename.xml" in /in/AkWBZ on line 8 Fatal error: Call to a member function asXML() on boolean in /in/AkWBZ on line 10
Process exited with code 255.
Output for 5.1.0 - 5.5.36
Warning: simplexml_load_file(): I/O warning : failed to load external entity "filename.xml" in /in/AkWBZ on line 8 Fatal error: Call to a member function asXML() on a non-object in /in/AkWBZ on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: I/O warning : failed to load external entity "filename.xml" in /in/AkWBZ on line 8 Fatal error: Call to a member function asXML() on a non-object in /in/AkWBZ on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/AkWBZ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/AkWBZ on line 3