- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
$tmp = '{"Request headers":"POST /VALKTEST/V1.1.5-V491/service.asmx HTTP/1.1\r\nHost: testcwi.itsrezexchange.net\r\nConnection: Keep-Alive\r\nUser-Agent: PHP-SOAP/5.6.24\r\nContent-Type: text/xml; charset=utf-8\r\nSOAPAction: \"http://hotelconcepts.com/CwiModifyReservation\"\r\nContent-Length: 2816\r\n\r\n","Request body":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://hotelconcepts.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><SOAP-ENV:Header><ns1:Authentication><ns1:User>VDCCWIAZ</ns1:User><ns1:Password>AZ_1029!</ns1:Password><ns1:CrsProperty>VDC</ns1:CrsProperty></ns1:Authentication></SOAP-ENV:Header><SOAP-ENV:Body><ns1:CwiModifyReservation><ns1:Reservation><ns1:ConfirmationNumber>HBR-FX900898</ns1:ConfirmationNumber><ns1:PropertyCode>BRE</ns1:PropertyCode><ns1:ArrivalDate>2017-02-25T00:00:00+00:00</ns1:ArrivalDate><ns1:DepartDate>2017-02-26T00:00:00+00:00</ns1:DepartDate><ns1:Rooms>1</ns1:Rooms><ns1:Adults>2</ns1:Adults><ns1:Children>0</ns1:Children><ns1:Infants>0</ns1:Infants><ns1:RatePlan>TARIEF1</ns1:RatePlan><ns1:Mealplan>LG</ns1:Mealplan><ns1:RoomType>SUITE</ns1:RoomType><ns1:Reference>Online</ns1:Reference><ns1:Tentative>false</ns1:Tentative><ns1:OptionDate xsi:nil=\"true\"/><ns1:PaymentType>ER</ns1:PaymentType><ns1:Guarantee><ns1:GuaranteeCode>BETAALD</ns1:GuaranteeCode><ns1:GuaranteeType>AllChargesAR</ns1:GuaranteeType></ns1:Guarantee><ns1:Guest><ns1:LastName>Maat</ns1:LastName><ns1:FirstName>Michael</ns1:FirstName><ns1:Prefix></ns1:Prefix><ns1:Address id=\"ref1\"><ns1:Phone>0644745027</ns1:Phone></ns1:Address><ns1:Authentication><ns1:UserName>Maat-Michael0644745027</ns1:UserName><ns1:Password>0644745027</ns1:Password></ns1:Authentication><ns1:EmailAddress>michael@aanzee.nl</ns1:EmailAddress><ns1:IncludeInMailing>false</ns1:IncludeInMailing><ns1:LanguageCode>nl</ns1:LanguageCode><ns1:FrequentStayNumber>67101</ns1:FrequentStayNumber><ns1:FrequentStayType>VA</ns1:FrequentStayType><ns1:VipCategory>VA</ns1:VipCategory><ns1:DateOfBirth>1999-02-01</ns1:DateOfBirth></ns1:Guest><ns1:Booker><ns1:LastName>Maat</ns1:LastName><ns1:FirstName>Michael</ns1:FirstName><ns1:Prefix></ns1:Prefix><ns1:Title>MR</ns1:Title><ns1:Address href=\"#ref1\"/><ns1:Authentication><ns1:UserName>Maat-Michael0644745027</ns1:UserName><ns1:Password>0644745027</ns1:Password></ns1:Authentication><ns1:EmailAddress>michael@aanzee.nl</ns1:EmailAddress><ns1:IncludeInMailing>false</ns1:IncludeInMailing><ns1:LanguageCode>nl</ns1:LanguageCode><ns1:FrequentStayNumber>67101</ns1:FrequentStayNumber><ns1:FrequentStayType>VA</ns1:FrequentStayType><ns1:VipCategory>VA</ns1:VipCategory><ns1:DateOfBirth>1999-02-01</ns1:DateOfBirth></ns1:Booker><ns1:Extras/><ns1:Comments> - Booker name: Michael Maat\n - Valk Account ID: 67101\n</ns1:Comments><ns1:ReservationBalance>0</ns1:ReservationBalance><ns1:CroFolio>20183</ns1:CroFolio><ns1:CroReference>20183</ns1:CroReference></ns1:Reservation><ns1:OverridePassword>V@lkInternet!</ns1:OverridePassword><ns1:Language>nl</ns1:Language></ns1:CwiModifyReservation></SOAP-ENV:Body></SOAP-ENV:Envelope>\n","Response headers":"HTTP/1.1 200 OK\r\nCache-Control: private, max-age=0\r\nContent-Length: 510\r\nContent-Type: text/xml; charset=utf-8\r\nServer: Microsoft-IIS/8.5\r\nX-AspNet-Version: 4.0.30319\r\nX-Powered-By: ASP.NET\r\nDate: Wed, 01 Feb 2017 14:28:01 GMT\r\n","Response body":"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><CwiModifyReservationResponse xmlns=\"http://hotelconcepts.com/\"><CwiModifyReservationResult><ErrorInfo><ErrorCode>301</ErrorCode><ErrorMessage>Reservation not found</ErrorMessage><ErrorData /></ErrorInfo></CwiModifyReservationResult></CwiModifyReservationResponse></soap:Body></soap:Envelope>","date-time":"2017-02-01 14:28:01"}';
var_dump(json_decode($tmp, true));