3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv=\”http://schemas.xmlsoap.org/soap/envelope/” xmlns=\”urn:enterprise.soap.sforce.com\” xmlns:xsi=\”http://www.w3.org/2001/XMLSchema-instance\”><soapenv:Body><loginResponse><result><metadataServerUrl>https://abc.wyz.com/services/Soap/m/28.0/00D50000000IdrE </metadataServerUrl><passwordExpired>false</passwordExpired><sandbox>false</sandbox><serverUrl>https://abc.wyz.com/services/Soap/c/28.0/00D50000000IdrE </serverUrl><sessionId>00D50000000IdrE!AREAQK4VYXRaXw3ahAt2Cge254wygiW7cr_f6DVa2pDC6g57w5IEfidAu3ZRsJFBN5Bwb6DVhF18zKFiVVyT</sessionId><userId>005500AAC</userId><userInfo><accessibilityMode>false</accessibilityMode><currencySymbol>$</currencySymbol><orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit><orgDefaultCurrencyIsoCode>USD</orgDefaultCurrencyIsoCode><orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments><orgHasPersonAccounts>false</orgHasPersonAccounts><organizationId>00D50000000IdrEEAS</organizationId><organizationMultiCurrency>false</organizationMultiCurrency><organizationName>ABC</organizationName><profileId>00e500000017al5AAA</profileId><roleId xsi:nil=\”true\”/><sessionSecondsValid>7200</sessionSecondsValid><userDefaultCurrencyIsoCode xsi:nil=\”true\”/><userEmail>ramana@3clogic.com</userEmail><userFullName>hemanonearth</userFullName><userId>00550000001Dd4uAAC</userId><userLanguage>en_US</userLanguage><userLocale>en_US</userLocale><userName>ramana@3clogic.com</userName><userTimeZone>America/New_York</userTimeZone><userType>Standard</userType><userUiSkin>Theme3</userUiSkin></userInfo></result></loginResponse></soapenv:Body></soapenv:Envelope> EOD; $sxe = new SimpleXMLElement($xml); $sxe->registerXPathNamespace('env', 'http://schemas.xmlsoap.org/soap/envelope/'); $sxe->registerXPathNamespace('def', 'urn:enterprise.soap.sforce.com');
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 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, 8.3.0 - 8.3.4
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : XML declaration allowed only at the start of the document in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:so in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : AttValue: " or ' expected in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : attributes construct error in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix soapenv on Envelope is not defined in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Couldn't find end of Start Tag Envelope line 1 in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Extra content at the end of the document in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/t35L5:10 Stack trace: #0 /in/t35L5(10): SimpleXMLElement->__construct(' <?xml version=...') #1 {main} thrown in /in/t35L5 on line 10
Process exited with code 255.
Output for 5.1.0 - 5.1.1, 5.1.3 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : XML declaration allowed only at the start of the document in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:so in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : AttValue: " or ' expected in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : attributes construct error in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix soapenv on Envelope is not defined in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Couldn't find end of Start Tag Envelope line 1 in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Extra content at the end of the document in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 10 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/t35L5:10 Stack trace: #0 /in/t35L5(10): SimpleXMLElement->__construct(' <?xml version=...') #1 {main} thrown in /in/t35L5 on line 10
Process exited with code 255.
Output for 5.1.2
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : XML declaration allowed only at the start of the document in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:so in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : AttValue: " or ' expected in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : attributes construct error in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): namespace error : Namespace prefix soapenv on Envelope is not defined in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Couldn't find end of Start Tag Envelope line 1 in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Extra content at the end of the document in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 11 Warning: SimpleXMLElement::__construct(): ^ in /in/t35L5 on line 11 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/t35L5:11 Stack trace: #0 /in/t35L5(11): SimpleXMLElement->__construct(' <?xml version=...') #1 {main} thrown in /in/t35L5 on line 11
Process exited with code 255.
Output for 5.0.3 - 5.0.5
Warning: Entity: line 1: parser error : XML declaration allowed only at the start of the document in /in/t35L5 on line 10 Warning: <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:so in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : AttValue: " or ' expected in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : attributes construct error in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: namespace error : Namespace prefix soapenv on Envelope is not defined in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : Couldn't find end of Start Tag Envelope line 1 in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : Extra content at the end of the document in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/t35L5:10 Stack trace: #0 /in/t35L5(10): SimpleXMLElement->__construct(' <?xml version=...') #1 {main} thrown in /in/t35L5 on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Warning: Entity: line 1: parser error : XML declaration allowed only at the start of the document in /in/t35L5 on line 10 Warning: <?xml version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:so in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : AttValue: " or ' expected in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : attributes construct error in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: namespace error : Namespace prefix soapenv on Envelope is not defined in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : Couldn't find end of Start Tag Envelope line 1 in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Warning: Entity: line 1: parser error : Extra content at the end of the document in /in/t35L5 on line 10 Warning: version=\”1.0\” encoding=\”UTF-8\”?><soapenv:Envelope xmlns:soapenv= in /in/t35L5 on line 10 Warning: ^ in /in/t35L5 on line 10 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/t35L5:10 Stack trace: #0 {main} thrown in /in/t35L5 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.9
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/t35L5 on line 10
Process exited with code 255.
Output for 4.4.2
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/t35L5 on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: simplexmlelement in /in/t35L5 on line 10

preferences:
294.86 ms | 401 KiB | 394 Q