3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $soapEnv = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> </soap:Envelope>'; var_dump($xml); $obj = new SimpleXMLElement($xml); var_dump($obj);
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Notice: Undefined variable: xml in /in/dmDZQ on line 7 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/dmDZQ:7 Stack trace: #0 /in/dmDZQ(7): SimpleXMLElement->__construct('') #1 {main} thrown in /in/dmDZQ on line 7
Process exited with code 255.
Output for 5.0.4 - 5.6.28
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Notice: Undefined variable: xml in /in/dmDZQ on line 7 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/dmDZQ:7 Stack trace: #0 /in/dmDZQ(7): SimpleXMLElement->__construct('') #1 {main} thrown in /in/dmDZQ on line 7
Process exited with code 255.
Output for 5.0.3
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Notice: Undefined variable: xml in /in/dmDZQ on line 7 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/dmDZQ:7 Stack trace: #0 /in/dmDZQ(7): SimpleXMLElement->__construct('') #1 {main} thrown in /in/dmDZQ on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Notice: Undefined variable: xml in /in/dmDZQ on line 7 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/dmDZQ:7 Stack trace: #0 {main} thrown in /in/dmDZQ on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/dmDZQ on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: xml in /in/dmDZQ on line 5 NULL Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/dmDZQ on line 7