3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = " <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'> <SOAP-ENV:Body> <OTA_HotelResNotifRS xmlns='http://www.opentravel.org/OTA/2003/05' TimeStamp='2016-12-01T07:14:56' EchoToken='f3edc6ef-8734-4c83-8675-c9462d808e62' Version='1.003' xsi:schemaLocation='http://www.opentravel.org/OTA/2003/05 OTA_HotelResNotifRQ.xsd'> <Errors Type='3'> <Error Type='1'>Premature end of file.</Error> </Errors> </OTA_HotelResNotifRS> </SOAP-ENV:Body> </SOAP-ENV:Envelope>"; function parseReservationResponseXML($content) { /* * RateTiger response da xsi eklenince hata aldigimizdan dolayi bu bolum siliniyor. */ $content = str_replace("xsi:schemaLocation='http://www.opentravel.org/OTA/2003/05 OTA_HotelResNotifRQ.xsd'", '', $content); $requestParams = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $content); $xml = new SimpleXMLElement($requestParams); $body = $xml->xpath('//SOAP-ENV:Body')[0]; return json_decode(json_encode((array)$body), true); } var_dump(parseReservationResponseXML($a));
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["OTA_HotelResNotifRS"]=> array(2) { ["@attributes"]=> array(3) { ["TimeStamp"]=> string(19) "2016-12-01T07:14:56" ["EchoToken"]=> string(36) "f3edc6ef-8734-4c83-8675-c9462d808e62" ["Version"]=> string(5) "1.003" } ["Errors"]=> array(2) { ["@attributes"]=> array(1) { ["Type"]=> string(1) "3" } ["Error"]=> string(22) "Premature end of file." } } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.29 ms | 402 KiB | 8 Q