3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nodes = '<air:AirPricingInfo Key="3T" TotalPrice="EUR328.98" BasePrice="EUR191.00" ApproximateTotalPrice="EUR328.98" ApproximateBasePrice="EUR191.00" Taxes="EUR137.98" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"> <air:FareInfo Key="13T" FareBasis="TWKNL" PassengerTypeCode="ADT" SegmentOrigin="AMS" Origin="AMS" SegmentDestination="FCO" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.621+02:00" Amount="NUC125.56"> <air:FareRuleKey FareInfoRef="13T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:FareInfo Key="15T" FareBasis="TWKNL" PassengerTypeCode="ADT" SegmentOrigin="FCO" Origin="ROM" SegmentDestination="AMS" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.630+02:00" Amount="NUC125.56"> <air:FareRuleKey FareInfoRef="15T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:BookingInfo BookingCode="T" FareInfoRef="13T" SegmentRef="1T"/> <air:BookingInfo BookingCode="T" FareInfoRef="15T" SegmentRef="2T"/> <air:PassengerType Code="ADT" BookingTravelerRef="1"/> </air:AirPricingInfo> <air:AirPricingInfo Key="17T" TotalPrice="EUR275.52" BasePrice="EUR144.00" ApproximateTotalPrice="EUR275.52" ApproximateBasePrice="EUR144.00" Taxes="EUR131.52" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"> <air:FareInfo Key="27T" FareBasis="TWKNL" PassengerTypeCode="CNN" SegmentOrigin="AMS" Origin="AMS" SegmentDestination="FCO" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.653+02:00" Amount="NUC94.17"> <air:FareTicketDesignator Value="CH25"/> <air:FareRuleKey FareInfoRef="27T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:FareInfo Key="29T" FareBasis="TWKNL" PassengerTypeCode="CNN" SegmentOrigin="FCO" Origin="ROM" SegmentDestination="AMS" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.655+02:00" Amount="NUC94.17"> <air:FareTicketDesignator Value="CH25"/> <air:FareRuleKey FareInfoRef="29T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:BookingInfo BookingCode="T" FareInfoRef="27T" SegmentRef="1T"/> <air:BookingInfo BookingCode="T" FareInfoRef="29T" SegmentRef="2T"/> <air:PassengerType Code="CNN" BookingTravelerRef="2"/> </air:AirPricingInfo> <air:AirPricingInfo Key="31T" TotalPrice="EUR19.00" BasePrice="EUR19.00" ApproximateTotalPrice="EUR19.00" ApproximateBasePrice="EUR19.00" Taxes="EUR0.00" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"> <air:FareInfo Key="32T" FareBasis="TWKNL" PassengerTypeCode="INF" SegmentOrigin="AMS" Origin="AMS" SegmentDestination="FCO" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.656+02:00" Amount="NUC12.55"> <air:FareTicketDesignator Value="IN90"/> <air:FareRuleKey FareInfoRef="32T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:FareInfo Key="34T" FareBasis="TWKNL" PassengerTypeCode="INF" SegmentOrigin="FCO" Origin="ROM" SegmentDestination="AMS" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.657+02:00" Amount="NUC12.55"> <air:FareTicketDesignator Value="IN90"/> <air:FareRuleKey FareInfoRef="34T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey> </air:FareInfo> <air:BookingInfo BookingCode="T" FareInfoRef="32T" SegmentRef="1T"/> <air:BookingInfo BookingCode="T" FareInfoRef="34T" SegmentRef="2T"/> <air:PassengerType Code="INF" BookingTravelerRef="3"/> </air:AirPricingInfo>'; $oMain = new DOMDocument(); $oMain->preserveWhiteSpace = false; $oMain->formatOutput = true; $oMain->loadXml('<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <air:AirCreateReservationReq xmlns:air="http://www.travelport.com/schema/air_v22_0" xmlns:com="http://www.travelport.com/schema/common_v19_0" AuthorizedBy="UAPI" TargetBranch="P7011033" ProviderCode="1P" Version="22"> <com:BillingPointOfSaleInfo OriginApplication="UAPI"/> <com:BookingTraveler DOB="1993-03-23" TravelerType="ADT" Key="1" Gender="M"> <com:BookingTravelerName First="Edo" Last="Rivai" Prefix="Dhr."/> <com:PhoneNumber Number="09007772228"/> </com:BookingTraveler> <com:BookingTraveler DOB="2008-05-05" TravelerType="CNN" Key="2" Gender="M"> <com:BookingTravelerName First="Bob" Last="stolk" Prefix="Dhr."/> <com:PhoneNumber Number="09007772228"/> </com:BookingTraveler> <com:BookingTraveler DOB="2013-01-01" TravelerType="INF" Key="3" Gender="M"> <com:BookingTravelerName First="Jens" Last="Steenhuis" Prefix="Dhr."/> <com:PhoneNumber Number="09007772228"/> </com:BookingTraveler> <air:AirPricingSolution Key="0T"> <air:AirSegment Key="1T" Group="0" Origin="AMS" Destination="FCO" Carrier="KL" FlightNumber="1609" ClassOfService="T" DepartureTime="2013-11-08T21:00:00.000+01:00" ArrivalTime="2013-11-08T23:10:00.000+01:00" ProviderCode="1P"/> <air:AirSegment Key="2T" Group="1" Origin="FCO" Destination="AMS" Carrier="KL" FlightNumber="1608" ClassOfService="T" DepartureTime="2013-11-30T21:15:00.000+01:00" ArrivalTime="2013-11-30T23:40:00.000+01:00" ProviderCode="1P"/> </air:AirPricingSolution> <com:ActionStatus Type="TAW" TicketDate="2013-10-09" ProviderCode="1P"/> </air:AirCreateReservationReq> </soapenv:Body> </soapenv:Envelope>'); $oAirPricingSolutionNode = $oMain->getElementsByTagName("AirPricingSolution")->item(0); $oNodesEncapsulated = new DOMDocument(); $oNodesEncapsulated->preserveWhiteSpace = false; //$oNodesEncapsulated->formatOutput = true; $oNodesEncapsulated->loadXml('<root><air:wrapper xmlns:common_v19_0="http://www.travelport.com/schema/common_v19_0" xmlns:air="http://www.travelport.com/schema/air_v22_0" TransactionId="98C211960A076113466F7BECF086E1DC" ResponseTime="4399">'.$nodes.'</air:wrapper></root>'); # Select all air:PricingInfo nodes $oAirPricingInfoNodes = $oNodesEncapsulated->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirPricingInfo'); # Check amount of nodes in selection if( ! $oAirPricingInfoNodes->length){ return FALSE; } $iKey = 3; # Loop over air:PricingInfo node selection foreach($oAirPricingInfoNodes as $oAirPricingInfoNode) { # Assign new key to the AirPricingNode $oAirPricingInfoNode->setAttribute("Key", ($iKey++)."T"); # Remove all nodes except the fareInfo nodes $oCurrentNode = $oAirPricingInfoNode->firstChild; while(NULL !== $oCurrentNode) { if (/*1 == $oCurrentNode->nodeType && */"air:FareInfo" != $oCurrentNode->nodeName) { $oRemovable = $oCurrentNode; $oCurrentNode = $oCurrentNode->nextSibling; $oAirPricingInfoNode->removeChild($oRemovable); // echo $oCurrentNode->nodeName . "\n"; } else { $oCurrentNode = $oCurrentNode->nextSibling; } } $oAirPricingSolutionNode->appendChild($oMain->importNode($oAirPricingInfoNode, TRUE)); } $oAirPricingInfoNodes = $oMain->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirPricingInfo'); # Define a list of AirPricingInfo nodes for which passenger types have been added $aPricingInfoNodesWithPassengerType = []; foreach($oAirPricingInfoNodes as $oAirPricingInfoNode) { $aPricingInfoNodesWithPassengerType[] = array("node" => $oAirPricingInfoNode, "passenger-added" => FALSE); } $oSegmentNodes = $oAirPricingSolutionNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirSegment'); $oTravelerNodes = $oMain->getElementsByTagNameNs('http://www.travelport.com/schema/common_v19_0', 'BookingTraveler'); # Loop over the segments, and add BookingInfo nodes in accordance with the segments foreach($oSegmentNodes as $oSegmentNode) { foreach($oAirPricingInfoNodes as $oAirPricingInfoNode) { // $oMatchingFareInfoNode; foreach($oAirPricingInfoNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'FareInfo') as $oFareInfoNode) { if ($oFareInfoNode->getAttribute("SegmentOrigin") == $oSegmentNode->getAttribute("Origin") && $oFareInfoNode->getAttribute("SegmentDestination") == $oSegmentNode->getAttribute("Destination")) { $oMatchingFareInfoNode = $oFareInfoNode; } } # Assing new key to the FareInfoNode $oMatchingFareInfoNode->setAttribute("Key", ($iKey++)."T"); # Make the FareRuleKey's FareInfoRef match the Key of its parent (FareInfo) $oAirPricingInfoNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'FareRuleKey')->item(0)->setAttribute("FareInfoRef", $oMatchingFareInfoNode->getAttribute("Key")); //echo $oAirPricingInfoNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'PassengerType')->length . "\n"; # Add passenger type information if none exist yet. foreach($aPricingInfoNodesWithPassengerType as $oNodeWrapper) { if ($oNodeWrapper["node"] == $oAirPricingInfoNode) { echo "found!: ".json_encode($oNodeWrapper)."\n"; $aPricingInfoNodeWithPassengerType = $oNodeWrapper; } } if (FALSE == $aPricingInfoNodeWithPassengerType["passenger-added"]) { foreach($oTravelerNodes as $oTravelerNode) { # Only add passenger types for the passengers whose type matches the passenger type in the matching fare info node if ($oTravelerNode->getAttribute("TravelerType") == $oMatchingFareInfoNode->getAttribute("PassengerTypeCode")) { # Create the passenger type node $oPassengerTypeNode = $oMain->createElement("air:PassengerType"); $oPassengerTypeNode->setAttribute("Code", $oTravelerNode->getAttribute("TravelerType")); $oPassengerTypeNode->setAttribute("BookingTravelerRef", $oTravelerNode->getAttribute("Key")); $oAirPricingInfoNode->appendChild($oPassengerTypeNode); $aPricingInfoNodeWithPassengerType["passenger-added"] = TRUE; } } } # Create the BookingInfo element $oBookingInfoNode = $oMain->createElement("air:BookingInfo"); $oBookingInfoNode->setAttribute("BookingCode", $oSegmentNode->getAttribute("ClassOfService")); $oBookingInfoNode->setAttribute("FareInfoRef", $oMatchingFareInfoNode->getAttribute("Key")); $oBookingInfoNode->setAttribute("SegmentRef", $oSegmentNode->getAttribute("Key")); $oAirPricingInfoNode->appendChild($oBookingInfoNode); } } echo $oMain->saveXml() . "\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 71
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 71
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 49
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 59
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 63, Position 2 = 49
Branch analysis from position: 63
Branch analysis from position: 49
Branch analysis from position: 71
2 jumps found. (Code = 77) Position 1 = 79, Position 2 = 85
Branch analysis from position: 79
2 jumps found. (Code = 78) Position 1 = 80, Position 2 = 85
Branch analysis from position: 80
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Branch analysis from position: 85
2 jumps found. (Code = 77) Position 1 = 97, Position 2 = 229
Branch analysis from position: 97
2 jumps found. (Code = 78) Position 1 = 98, Position 2 = 229
Branch analysis from position: 98
2 jumps found. (Code = 77) Position 1 = 99, Position 2 = 227
Branch analysis from position: 99
2 jumps found. (Code = 78) Position 1 = 100, Position 2 = 227
Branch analysis from position: 100
2 jumps found. (Code = 77) Position 1 = 105, Position 2 = 125
Branch analysis from position: 105
2 jumps found. (Code = 78) Position 1 = 106, Position 2 = 125
Branch analysis from position: 106
2 jumps found. (Code = 46) Position 1 = 114, Position 2 = 122
Branch analysis from position: 114
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 124
Branch analysis from position: 123
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
Branch analysis from position: 124
Branch analysis from position: 122
Branch analysis from position: 125
2 jumps found. (Code = 77) Position 1 = 147, Position 2 = 159
Branch analysis from position: 147
2 jumps found. (Code = 78) Position 1 = 148, Position 2 = 159
Branch analysis from position: 148
2 jumps found. (Code = 43) Position 1 = 151, Position 2 = 158
Branch analysis from position: 151
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
Branch analysis from position: 158
Branch analysis from position: 159
2 jumps found. (Code = 43) Position 1 = 163, Position 2 = 198
Branch analysis from position: 163
2 jumps found. (Code = 77) Position 1 = 164, Position 2 = 197
Branch analysis from position: 164
2 jumps found. (Code = 78) Position 1 = 165, Position 2 = 197
Branch analysis from position: 165
2 jumps found. (Code = 43) Position 1 = 173, Position 2 = 196
Branch analysis from position: 173
1 jumps found. (Code = 42) Position 1 = 164
Branch analysis from position: 164
Branch analysis from position: 196
Branch analysis from position: 197
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
Branch analysis from position: 197
Branch analysis from position: 198
Branch analysis from position: 159
Branch analysis from position: 125
Branch analysis from position: 227
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
Branch analysis from position: 227
Branch analysis from position: 229
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 229
Branch analysis from position: 85
Branch analysis from position: 71
filename:       /in/soMcn
function name:  (null)
number of ops:  235
compiled vars:  !0 = $nodes, !1 = $oMain, !2 = $oAirPricingSolutionNode, !3 = $oNodesEncapsulated, !4 = $oAirPricingInfoNodes, !5 = $iKey, !6 = $oAirPricingInfoNode, !7 = $oCurrentNode, !8 = $oRemovable, !9 = $aPricingInfoNodesWithPassengerType, !10 = $oSegmentNodes, !11 = $oTravelerNodes, !12 = $oSegmentNode, !13 = $oFareInfoNode, !14 = $oMatchingFareInfoNode, !15 = $oNodeWrapper, !16 = $aPricingInfoNodeWithPassengerType, !17 = $oTravelerNode, !18 = $oPassengerTypeNode, !19 = $oBookingInfoNode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cair%3AAirPricingInfo+Key%3D%223T%22+TotalPrice%3D%22EUR328.98%22+BasePrice%3D%22EUR191.00%22+ApproximateTotalPrice%3D%22EUR328.98%22+ApproximateBasePrice%3D%22EUR191.00%22+Taxes%3D%22EUR137.98%22+LatestTicketingTime%3D%222013-10-15T23%3A59%3A00.000%2B00%3A00%22+PricingMethod%3D%22Auto%22+PlatingCarrier%3D%22KL%22+ProviderCode%3D%221P%22%3E%0A%3Cair%3AFareInfo+Key%3D%2213T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22ADT%22+SegmentOrigin%3D%22AMS%22+Origin%3D%22AMS%22+SegmentDestination%3D%22FCO%22+Destination%3D%22ROM%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.621%2B02%3A00%22+Amount%3D%22NUC125.56%22%3E%0A%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2213T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3AFareInfo+Key%3D%2215T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22ADT%22+SegmentOrigin%3D%22FCO%22+Origin%3D%22ROM%22+SegmentDestination%3D%22AMS%22+Destination%3D%22AMS%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.630%2B02%3A00%22+Amount%3D%22NUC125.56%22%3E%0A%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2215T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2213T%22+SegmentRef%3D%221T%22%2F%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2215T%22+SegmentRef%3D%222T%22%2F%3E%0A%09%3Cair%3APassengerType+Code%3D%22ADT%22+BookingTravelerRef%3D%221%22%2F%3E%0A%3C%2Fair%3AAirPricingInfo%3E%0A%3Cair%3AAirPricingInfo+Key%3D%2217T%22+TotalPrice%3D%22EUR275.52%22+BasePrice%3D%22EUR144.00%22+ApproximateTotalPrice%3D%22EUR275.52%22+ApproximateBasePrice%3D%22EUR144.00%22+Taxes%3D%22EUR131.52%22+LatestTicketingTime%3D%222013-10-15T23%3A59%3A00.000%2B00%3A00%22+PricingMethod%3D%22Auto%22+PlatingCarrier%3D%22KL%22+ProviderCode%3D%221P%22%3E%0A%09%3Cair%3AFareInfo+Key%3D%2227T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22CNN%22+SegmentOrigin%3D%22AMS%22+Origin%3D%22AMS%22+SegmentDestination%3D%22FCO%22+Destination%3D%22ROM%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.653%2B02%3A00%22+Amount%3D%22NUC94.17%22%3E%0A%09%09%3Cair%3AFareTicketDesignator+Value%3D%22CH25%22%2F%3E%0A%09%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2227T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3AFareInfo+Key%3D%2229T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22CNN%22+SegmentOrigin%3D%22FCO%22+Origin%3D%22ROM%22+SegmentDestination%3D%22AMS%22+Destination%3D%22AMS%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.655%2B02%3A00%22+Amount%3D%22NUC94.17%22%3E%0A%09%09%3Cair%3AFareTicketDesignator+Value%3D%22CH25%22%2F%3E%0A%09%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2229T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2227T%22+SegmentRef%3D%221T%22%2F%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2229T%22+SegmentRef%3D%222T%22%2F%3E%0A%09%3Cair%3APassengerType+Code%3D%22CNN%22+BookingTravelerRef%3D%222%22%2F%3E%0A%3C%2Fair%3AAirPricingInfo%3E%0A%3Cair%3AAirPricingInfo+Key%3D%2231T%22+TotalPrice%3D%22EUR19.00%22+BasePrice%3D%22EUR19.00%22+ApproximateTotalPrice%3D%22EUR19.00%22+ApproximateBasePrice%3D%22EUR19.00%22+Taxes%3D%22EUR0.00%22+LatestTicketingTime%3D%222013-10-15T23%3A59%3A00.000%2B00%3A00%22+PricingMethod%3D%22Auto%22+PlatingCarrier%3D%22KL%22+ProviderCode%3D%221P%22%3E%0A%09%3Cair%3AFareInfo+Key%3D%2232T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22INF%22+SegmentOrigin%3D%22AMS%22+Origin%3D%22AMS%22+SegmentDestination%3D%22FCO%22+Destination%3D%22ROM%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.656%2B02%3A00%22+Amount%3D%22NUC12.55%22%3E%0A%09%09%3Cair%3AFareTicketDesignator+Value%3D%22IN90%22%2F%3E%0A%09%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2232T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3AFareInfo+Key%3D%2234T%22+FareBasis%3D%22TWKNL%22+PassengerTypeCode%3D%22INF%22+SegmentOrigin%3D%22FCO%22+Origin%3D%22ROM%22+SegmentDestination%3D%22AMS%22+Destination%3D%22AMS%22+EffectiveDate%3D%222013-10-08T17%3A49%3A20.657%2B02%3A00%22+Amount%3D%22NUC12.55%22%3E%0A%09%09%3Cair%3AFareTicketDesignator+Value%3D%22IN90%22%2F%3E%0A%09%09%3Cair%3AFareRuleKey+FareInfoRef%3D%2234T%22+ProviderCode%3D%221P%22%3ESo05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel%2Be1Y8YwIV8pQurxVP92%3C%2Fair%3AFareRuleKey%3E%0A%09%3C%2Fair%3AFareInfo%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2232T%22+SegmentRef%3D%221T%22%2F%3E%0A%09%3Cair%3ABookingInfo+BookingCode%3D%22T%22+FareInfoRef%3D%2234T%22+SegmentRef%3D%222T%22%2F%3E%0A%09%3Cair%3APassengerType+Code%3D%22INF%22+BookingTravelerRef%3D%223%22%2F%3E%0A%3C%2Fair%3AAirPricingInfo%3E'
   39     1        NEW                                              $21     'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $21
   40     4        ASSIGN_OBJ                                               !1, 'preserveWhiteSpace'
          5        OP_DATA                                                  <false>
   41     6        ASSIGN_OBJ                                               !1, 'formatOutput'
          7        OP_DATA                                                  <true>
   42     8        INIT_METHOD_CALL                                         !1, 'loadXml'
          9        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3Csoapenv%3AEnvelope+xmlns%3Asoapenv%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22%3E%0A%09%3Csoapenv%3AHeader%2F%3E%0A%09%3Csoapenv%3ABody%3E%0A%09%09%3Cair%3AAirCreateReservationReq+xmlns%3Aair%3D%22http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0%22+xmlns%3Acom%3D%22http%3A%2F%2Fwww.travelport.com%2Fschema%2Fcommon_v19_0%22+AuthorizedBy%3D%22UAPI%22+TargetBranch%3D%22P7011033%22+ProviderCode%3D%221P%22+Version%3D%2222%22%3E%0A%09%09%09%3Ccom%3ABillingPointOfSaleInfo+OriginApplication%3D%22UAPI%22%2F%3E%0A%09%09%09%3Ccom%3ABookingTraveler+DOB%3D%221993-03-23%22+TravelerType%3D%22ADT%22+Key%3D%221%22+Gender%3D%22M%22%3E%0A%09%09%09%09%3Ccom%3ABookingTravelerName+First%3D%22Edo%22+Last%3D%22Rivai%22+Prefix%3D%22Dhr.%22%2F%3E%0A%09%09%09%09%3Ccom%3APhoneNumber+Number%3D%2209007772228%22%2F%3E%0A%09%09%09%3C%2Fcom%3ABookingTraveler%3E%0A%09%09%09%3Ccom%3ABookingTraveler+DOB%3D%222008-05-05%22+TravelerType%3D%22CNN%22+Key%3D%222%22+Gender%3D%22M%22%3E%0A%09%09%09%09%3Ccom%3ABookingTravelerName+First%3D%22Bob%22+Last%3D%22stolk%22+Prefix%3D%22Dhr.%22%2F%3E%0A%09%09%09%09%3Ccom%3APhoneNumber+Number%3D%2209007772228%22%2F%3E%0A%09%09%09%3C%2Fcom%3ABookingTraveler%3E%0A%09%09%09%3Ccom%3ABookingTraveler+DOB%3D%222013-01-01%22+TravelerType%3D%22INF%22+Key%3D%223%22+Gender%3D%22M%22%3E%0A%09%09%09%09%3Ccom%3ABookingTravelerName+First%3D%22Jens%22+Last%3D%22Steenhuis%22+Prefix%3D%22Dhr.%22%2F%3E%0A%09%09%09%09%3Ccom%3APhoneNumber+Number%3D%2209007772228%22%2F%3E%0A%09%09%09%3C%2Fcom%3ABookingTraveler%3E%0A%09%09%09%3Cair%3AAirPricingSolution+Key%3D%220T%22%3E%0A%09%09%09%09%3Cair%3AAirSegment+Key%3D%221T%22+Group%3D%220%22+Origin%3D%22AMS%22+Destination%3D%22FCO%22+Carrier%3D%22KL%22+FlightNumber%3D%221609%22+ClassOfService%3D%22T%22+DepartureTime%3D%222013-11-08T21%3A00%3A00.000%2B01%3A00%22+ArrivalTime%3D%222013-11-08T23%3A10%3A00.000%2B01%3A00%22+ProviderCode%3D%221P%22%2F%3E%0A%09%09%09%09%3Cair%3AAirSegment+Key%3D%222T%22+Group%3D%221%22+Origin%3D%22FCO%22+Destination%3D%22AMS%22+Carrier%3D%22KL%22+FlightNumber%3D%221608%22+ClassOfService%3D%22T%22+DepartureTime%3D%222013-11-30T21%3A15%3A00.000%2B01%3A00%22+ArrivalTime%3D%222013-11-30T23%3A40%3A00.000%2B01%3A00%22+ProviderCode%3D%221P%22%2F%3E%0A%09%09%09%3C%2Fair%3AAirPricingSolution%3E%0A%09%09%09%3Ccom%3AActionStatus+Type%3D%22TAW%22+TicketDate%3D%222013-10-09%22+ProviderCode%3D%221P%22%2F%3E%0A%09%09%3C%2Fair%3AAirCreateReservationReq%3E%0A%09%3C%2Fsoapenv%3ABody%3E%0A%3C%2Fsoapenv%3AEnvelope%3E'
         10        DO_FCALL                                      0          
   68    11        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         12        SEND_VAL_EX                                              'AirPricingSolution'
         13        DO_FCALL                                      0  $27     
         14        INIT_METHOD_CALL                                         $27, 'item'
         15        SEND_VAL_EX                                              0
         16        DO_FCALL                                      0  $28     
         17        ASSIGN                                                   !2, $28
   69    18        NEW                                              $30     'DOMDocument'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $30
   70    21        ASSIGN_OBJ                                               !3, 'preserveWhiteSpace'
         22        OP_DATA                                                  <false>
   72    23        INIT_METHOD_CALL                                         !3, 'loadXml'
         24        CONCAT                                           ~34     '%3Croot%3E%3Cair%3Awrapper+xmlns%3Acommon_v19_0%3D%22http%3A%2F%2Fwww.travelport.com%2Fschema%2Fcommon_v19_0%22+xmlns%3Aair%3D%22http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0%22+TransactionId%3D%2298C211960A076113466F7BECF086E1DC%22+ResponseTime%3D%224399%22%3E', !0
         25        CONCAT                                           ~35     ~34, '%3C%2Fair%3Awrapper%3E%3C%2Froot%3E'
         26        SEND_VAL_EX                                              ~35
         27        DO_FCALL                                      0          
   74    28        INIT_METHOD_CALL                                         !3, 'getElementsByTagNameNs'
         29        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         30        SEND_VAL_EX                                              'AirPricingInfo'
         31        DO_FCALL                                      0  $37     
         32        ASSIGN                                                   !4, $37
   76    33        FETCH_OBJ_R                                      ~39     !4, 'length'
         34        BOOL_NOT                                         ~40     ~39
         35      > JMPZ                                                     ~40, ->37
   77    36    > > RETURN                                                   <false>
   79    37    >   ASSIGN                                                   !5, 3
   81    38      > FE_RESET_R                                       $42     !4, ->71
         39    > > FE_FETCH_R                                               $42, !6, ->71
   83    40    >   INIT_METHOD_CALL                                         !6, 'setAttribute'
         41        SEND_VAL_EX                                              'Key'
         42        POST_INC                                         ~43     !5
         43        CONCAT                                           ~44     ~43, 'T'
         44        SEND_VAL_EX                                              ~44
         45        DO_FCALL                                      0          
   85    46        FETCH_OBJ_R                                      ~46     !6, 'firstChild'
         47        ASSIGN                                                   !7, ~46
   86    48      > JMP                                                      ->61
   87    49    >   FETCH_OBJ_R                                      ~48     !7, 'nodeName'
         50        IS_NOT_EQUAL                                             ~48, 'air%3AFareInfo'
         51      > JMPZ                                                     ~49, ->59
   88    52    >   ASSIGN                                                   !8, !7
   89    53        FETCH_OBJ_R                                      ~51     !7, 'nextSibling'
         54        ASSIGN                                                   !7, ~51
   90    55        INIT_METHOD_CALL                                         !6, 'removeChild'
         56        SEND_VAR_EX                                              !8
         57        DO_FCALL                                      0          
         58      > JMP                                                      ->61
   93    59    >   FETCH_OBJ_R                                      ~54     !7, 'nextSibling'
         60        ASSIGN                                                   !7, ~54
   86    61    >   TYPE_CHECK                                  1020          !7
         62      > JMPNZ                                                    ~56, ->49
   97    63    >   INIT_METHOD_CALL                                         !2, 'appendChild'
         64        INIT_METHOD_CALL                                         !1, 'importNode'
         65        SEND_VAR_EX                                              !6
         66        SEND_VAL_EX                                              <true>
         67        DO_FCALL                                      0  $57     
         68        SEND_VAR_NO_REF_EX                                       $57
         69        DO_FCALL                                      0          
   81    70      > JMP                                                      ->39
         71    >   FE_FREE                                                  $42
   99    72        INIT_METHOD_CALL                                         !1, 'getElementsByTagNameNs'
         73        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         74        SEND_VAL_EX                                              'AirPricingInfo'
         75        DO_FCALL                                      0  $59     
         76        ASSIGN                                                   !4, $59
  102    77        ASSIGN                                                   !9, <array>
  103    78      > FE_RESET_R                                       $62     !4, ->85
         79    > > FE_FETCH_R                                               $62, !6, ->85
  104    80    >   INIT_ARRAY                                       ~64     !6, 'node'
         81        ADD_ARRAY_ELEMENT                                ~64     <false>, 'passenger-added'
         82        ASSIGN_DIM                                               !9
         83        OP_DATA                                                  ~64
  103    84      > JMP                                                      ->79
         85    >   FE_FREE                                                  $62
  107    86        INIT_METHOD_CALL                                         !2, 'getElementsByTagNameNs'
         87        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         88        SEND_VAL_EX                                              'AirSegment'
         89        DO_FCALL                                      0  $65     
         90        ASSIGN                                                   !10, $65
  108    91        INIT_METHOD_CALL                                         !1, 'getElementsByTagNameNs'
         92        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fcommon_v19_0'
         93        SEND_VAL_EX                                              'BookingTraveler'
         94        DO_FCALL                                      0  $67     
         95        ASSIGN                                                   !11, $67
  110    96      > FE_RESET_R                                       $69     !10, ->229
         97    > > FE_FETCH_R                                               $69, !12, ->229
  111    98    > > FE_RESET_R                                       $70     !4, ->227
         99    > > FE_FETCH_R                                               $70, !6, ->227
  113   100    >   INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
        101        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
        102        SEND_VAL_EX                                              'FareInfo'
        103        DO_FCALL                                      0  $71     
        104      > FE_RESET_R                                       $72     $71, ->125
        105    > > FE_FETCH_R                                               $72, !13, ->125
  114   106    >   INIT_METHOD_CALL                                         !13, 'getAttribute'
        107        SEND_VAL_EX                                              'SegmentOrigin'
        108        DO_FCALL                                      0  $73     
        109        INIT_METHOD_CALL                                         !12, 'getAttribute'
        110        SEND_VAL_EX                                              'Origin'
        111        DO_FCALL                                      0  $74     
        112        IS_EQUAL                                         ~75     $73, $74
        113      > JMPZ_EX                                          ~75     ~75, ->122
  115   114    >   INIT_METHOD_CALL                                         !13, 'getAttribute'
        115        SEND_VAL_EX                                              'SegmentDestination'
        116        DO_FCALL                                      0  $76     
        117        INIT_METHOD_CALL                                         !12, 'getAttribute'
        118        SEND_VAL_EX                                              'Destination'
        119        DO_FCALL                                      0  $77     
        120        IS_EQUAL                                         ~78     $76, $77
        121        BOOL                                             ~75     ~78
        122    > > JMPZ                                                     ~75, ->124
  116   123    >   ASSIGN                                                   !14, !13
  113   124    > > JMP                                                      ->105
        125    >   FE_FREE                                                  $72
  120   126        INIT_METHOD_CALL                                         !14, 'setAttribute'
        127        SEND_VAL_EX                                              'Key'
        128        POST_INC                                         ~80     !5
        129        CONCAT                                           ~81     ~80, 'T'
        130        SEND_VAL_EX                                              ~81
        131        DO_FCALL                                      0          
  122   132        INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
        133        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
        134        SEND_VAL_EX                                              'FareRuleKey'
        135        DO_FCALL                                      0  $83     
        136        INIT_METHOD_CALL                                         $83, 'item'
        137        SEND_VAL_EX                                              0
        138        DO_FCALL                                      0  $84     
        139        INIT_METHOD_CALL                                         $84, 'setAttribute'
        140        SEND_VAL_EX                                              'FareInfoRef'
        141        INIT_METHOD_CALL                                         !14, 'getAttribute'
        142        SEND_VAL_EX                                              'Key'
        143        DO_FCALL                                      0  $85     
        144        SEND_VAR_NO_REF_EX                                       $85
        145        DO_FCALL                                      0          
  126   146      > FE_RESET_R                                       $87     !9, ->159
        147    > > FE_FETCH_R                                               $87, !15, ->159
  127   148    >   FETCH_DIM_R                                      ~88     !15, 'node'
        149        IS_EQUAL                                                 !6, ~88
        150      > JMPZ                                                     ~89, ->158
  128   151    >   INIT_FCALL                                               'json_encode'
        152        SEND_VAR                                                 !15
        153        DO_ICALL                                         $90     
        154        CONCAT                                           ~91     'found%21%3A+', $90
        155        CONCAT                                           ~92     ~91, '%0A'
        156        ECHO                                                     ~92
  129   157        ASSIGN                                                   !16, !15
  126   158    > > JMP                                                      ->147
        159    >   FE_FREE                                                  $87
  132   160        FETCH_DIM_R                                      ~94     !16, 'passenger-added'
        161        BOOL_NOT                                         ~95     ~94
        162      > JMPZ                                                     ~95, ->198
  133   163    > > FE_RESET_R                                       $96     !11, ->197
        164    > > FE_FETCH_R                                               $96, !17, ->197
  135   165    >   INIT_METHOD_CALL                                         !17, 'getAttribute'
        166        SEND_VAL_EX                                              'TravelerType'
        167        DO_FCALL                                      0  $97     
        168        INIT_METHOD_CALL                                         !14, 'getAttribute'
        169        SEND_VAL_EX                                              'PassengerTypeCode'
        170        DO_FCALL                                      0  $98     
        171        IS_EQUAL                                                 $97, $98
        172      > JMPZ                                                     ~99, ->196
  137   173    >   INIT_METHOD_CALL                                         !1, 'createElement'
        174        SEND_VAL_EX                                              'air%3APassengerType'
        175        DO_FCALL                                      0  $100    
        176        ASSIGN                                                   !18, $100
  138   177        INIT_METHOD_CALL                                         !18, 'setAttribute'
        178        SEND_VAL_EX                                              'Code'
        179        INIT_METHOD_CALL                                         !17, 'getAttribute'
        180        SEND_VAL_EX                                              'TravelerType'
        181        DO_FCALL                                      0  $102    
        182        SEND_VAR_NO_REF_EX                                       $102
        183        DO_FCALL                                      0          
  139   184        INIT_METHOD_CALL                                         !18, 'setAttribute'
        185        SEND_VAL_EX                                              'BookingTravelerRef'
        186        INIT_METHOD_CALL                                         !17, 'getAttribute'
        187        SEND_VAL_EX                                              'Key'
        188        DO_FCALL                                      0  $104    
        189        SEND_VAR_NO_REF_EX                                       $104
        190        DO_FCALL                                      0          
  140   191        INIT_METHOD_CALL                                         !6, 'appendChild'
        192        SEND_VAR_EX                                              !18
        193        DO_FCALL                                      0          
  141   194        ASSIGN_DIM                                               !16, 'passenger-added'
        195        OP_DATA                                                  <true>
  133   196    > > JMP                                                      ->164
        197    >   FE_FREE                                                  $96
  147   198    >   INIT_METHOD_CALL                                         !1, 'createElement'
        199        SEND_VAL_EX                                              'air%3ABookingInfo'
        200        DO_FCALL                                      0  $108    
        201        ASSIGN                                                   !19, $108
  148   202        INIT_METHOD_CALL                                         !19, 'setAttribute'
        203        SEND_VAL_EX                                              'BookingCode'
        204        INIT_METHOD_CALL                                         !12, 'getAttribute'
        205        SEND_VAL_EX                                              'ClassOfService'
        206        DO_FCALL                                      0  $110    
        207        SEND_VAR_NO_REF_EX                                       $110
        208        DO_FCALL                                      0          
  149   209        INIT_METHOD_CALL                                         !19, 'setAttribute'
        210        SEND_VAL_EX                                              'FareInfoRef'
        211        INIT_METHOD_CALL                                         !14, 'getAttribute'
        212        SEND_VAL_EX                                              'Key'
        213        DO_FCALL                                      0  $112    
        214        SEND_VAR_NO_REF_EX                                       $112
        215        DO_FCALL                                      0          
  150   216        INIT_METHOD_CALL                                         !19, 'setAttribute'
        217        SEND_VAL_EX                                              'SegmentRef'
        218        INIT_METHOD_CALL                                         !12, 'getAttribute'
        219        SEND_VAL_EX                                              'Key'
        220        DO_FCALL                                      0  $114    
        221        SEND_VAR_NO_REF_EX                                       $114
        222        DO_FCALL                                      0          
  151   223        INIT_METHOD_CALL                                         !6, 'appendChild'
        224        SEND_VAR_EX                                              !19
        225        DO_FCALL                                      0          
  111   226      > JMP                                                      ->99
        227    >   FE_FREE                                                  $70
  110   228      > JMP                                                      ->97
        229    >   FE_FREE  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.82 ms | 1428 KiB | 15 Q