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'); $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. $bPassengerTypeNodeExists = FALSE; $oCurrentNode = $oAirPricingInfoNode->firstChild; while (NULL != $oCurrentNode) { $bPassengerTypeNodeExists = $bPassengerTypeNodeExists || "air:PassengerType" == $oCurrentNode->nodeName; echo ("air:PassengerType" == $oCurrentNode->nodeName) . ", " . $oCurrentNode->nodeName . "\n"; $oCurrentNode = $oCurrentNode->nextSibling; } if ($bPassengerTypeNodeExists) { 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 = 88, Position 2 = 222
Branch analysis from position: 88
2 jumps found. (Code = 78) Position 1 = 89, Position 2 = 222
Branch analysis from position: 89
2 jumps found. (Code = 77) Position 1 = 90, Position 2 = 220
Branch analysis from position: 90
2 jumps found. (Code = 78) Position 1 = 91, Position 2 = 220
Branch analysis from position: 91
2 jumps found. (Code = 77) Position 1 = 96, Position 2 = 116
Branch analysis from position: 96
2 jumps found. (Code = 78) Position 1 = 97, Position 2 = 116
Branch analysis from position: 97
2 jumps found. (Code = 46) Position 1 = 105, Position 2 = 113
Branch analysis from position: 105
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 115
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 115
Branch analysis from position: 113
Branch analysis from position: 116
1 jumps found. (Code = 42) Position 1 = 155
Branch analysis from position: 155
2 jumps found. (Code = 44) Position 1 = 157, Position 2 = 141
Branch analysis from position: 157
2 jumps found. (Code = 43) Position 1 = 158, Position 2 = 191
Branch analysis from position: 158
2 jumps found. (Code = 77) Position 1 = 159, Position 2 = 190
Branch analysis from position: 159
2 jumps found. (Code = 78) Position 1 = 160, Position 2 = 190
Branch analysis from position: 160
2 jumps found. (Code = 43) Position 1 = 168, Position 2 = 189
Branch analysis from position: 168
1 jumps found. (Code = 42) Position 1 = 159
Branch analysis from position: 159
Branch analysis from position: 189
Branch analysis from position: 190
1 jumps found. (Code = 42) Position 1 = 90
Branch analysis from position: 90
Branch analysis from position: 190
Branch analysis from position: 191
Branch analysis from position: 141
2 jumps found. (Code = 47) Position 1 = 142, Position 2 = 145
Branch analysis from position: 142
2 jumps found. (Code = 44) Position 1 = 157, Position 2 = 141
Branch analysis from position: 157
Branch analysis from position: 141
Branch analysis from position: 145
Branch analysis from position: 116
Branch analysis from position: 220
1 jumps found. (Code = 42) Position 1 = 88
Branch analysis from position: 88
Branch analysis from position: 220
Branch analysis from position: 222
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 222
Branch analysis from position: 71
filename:       /in/kQpR4
function name:  (null)
number of ops:  228
compiled vars:  !0 = $nodes, !1 = $oMain, !2 = $oAirPricingSolutionNode, !3 = $oNodesEncapsulated, !4 = $oAirPricingInfoNodes, !5 = $iKey, !6 = $oAirPricingInfoNode, !7 = $oCurrentNode, !8 = $oRemovable, !9 = $oSegmentNodes, !10 = $oTravelerNodes, !11 = $oSegmentNode, !12 = $oFareInfoNode, !13 = $oMatchingFareInfoNode, !14 = $bPassengerTypeNodeExists, !15 = $oTravelerNode, !16 = $oPassengerTypeNode, !17 = $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                                              $19     'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $19
   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  $25     
         14        INIT_METHOD_CALL                                         $25, 'item'
         15        SEND_VAL_EX                                              0
         16        DO_FCALL                                      0  $26     
         17        ASSIGN                                                   !2, $26
   69    18        NEW                                              $28     'DOMDocument'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $28
   70    21        ASSIGN_OBJ                                               !3, 'preserveWhiteSpace'
         22        OP_DATA                                                  <false>
   72    23        INIT_METHOD_CALL                                         !3, 'loadXml'
         24        CONCAT                                           ~32     '%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                                           ~33     ~32, '%3C%2Fair%3Awrapper%3E%3C%2Froot%3E'
         26        SEND_VAL_EX                                              ~33
         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  $35     
         32        ASSIGN                                                   !4, $35
   76    33        FETCH_OBJ_R                                      ~37     !4, 'length'
         34        BOOL_NOT                                         ~38     ~37
         35      > JMPZ                                                     ~38, ->37
   77    36    > > RETURN                                                   <false>
   79    37    >   ASSIGN                                                   !5, 3
   81    38      > FE_RESET_R                                       $40     !4, ->71
         39    > > FE_FETCH_R                                               $40, !6, ->71
   83    40    >   INIT_METHOD_CALL                                         !6, 'setAttribute'
         41        SEND_VAL_EX                                              'Key'
         42        POST_INC                                         ~41     !5
         43        CONCAT                                           ~42     ~41, 'T'
         44        SEND_VAL_EX                                              ~42
         45        DO_FCALL                                      0          
   85    46        FETCH_OBJ_R                                      ~44     !6, 'firstChild'
         47        ASSIGN                                                   !7, ~44
   86    48      > JMP                                                      ->61
   87    49    >   FETCH_OBJ_R                                      ~46     !7, 'nodeName'
         50        IS_NOT_EQUAL                                             ~46, 'air%3AFareInfo'
         51      > JMPZ                                                     ~47, ->59
   88    52    >   ASSIGN                                                   !8, !7
   89    53        FETCH_OBJ_R                                      ~49     !7, 'nextSibling'
         54        ASSIGN                                                   !7, ~49
   90    55        INIT_METHOD_CALL                                         !6, 'removeChild'
         56        SEND_VAR_EX                                              !8
         57        DO_FCALL                                      0          
         58      > JMP                                                      ->61
   93    59    >   FETCH_OBJ_R                                      ~52     !7, 'nextSibling'
         60        ASSIGN                                                   !7, ~52
   86    61    >   TYPE_CHECK                                  1020          !7
         62      > JMPNZ                                                    ~54, ->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  $55     
         68        SEND_VAR_NO_REF_EX                                       $55
         69        DO_FCALL                                      0          
   81    70      > JMP                                                      ->39
         71    >   FE_FREE                                                  $40
   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  $57     
         76        ASSIGN                                                   !4, $57
  101    77        INIT_METHOD_CALL                                         !2, 'getElementsByTagNameNs'
         78        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         79        SEND_VAL_EX                                              'AirSegment'
         80        DO_FCALL                                      0  $59     
         81        ASSIGN                                                   !9, $59
  102    82        INIT_METHOD_CALL                                         !1, 'getElementsByTagNameNs'
         83        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fcommon_v19_0'
         84        SEND_VAL_EX                                              'BookingTraveler'
         85        DO_FCALL                                      0  $61     
         86        ASSIGN                                                   !10, $61
  104    87      > FE_RESET_R                                       $63     !9, ->222
         88    > > FE_FETCH_R                                               $63, !11, ->222
  105    89    > > FE_RESET_R                                       $64     !4, ->220
         90    > > FE_FETCH_R                                               $64, !6, ->220
  107    91    >   INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
         92        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         93        SEND_VAL_EX                                              'FareInfo'
         94        DO_FCALL                                      0  $65     
         95      > FE_RESET_R                                       $66     $65, ->116
         96    > > FE_FETCH_R                                               $66, !12, ->116
  108    97    >   INIT_METHOD_CALL                                         !12, 'getAttribute'
         98        SEND_VAL_EX                                              'SegmentOrigin'
         99        DO_FCALL                                      0  $67     
        100        INIT_METHOD_CALL                                         !11, 'getAttribute'
        101        SEND_VAL_EX                                              'Origin'
        102        DO_FCALL                                      0  $68     
        103        IS_EQUAL                                         ~69     $67, $68
        104      > JMPZ_EX                                          ~69     ~69, ->113
  109   105    >   INIT_METHOD_CALL                                         !12, 'getAttribute'
        106        SEND_VAL_EX                                              'SegmentDestination'
        107        DO_FCALL                                      0  $70     
        108        INIT_METHOD_CALL                                         !11, 'getAttribute'
        109        SEND_VAL_EX                                              'Destination'
        110        DO_FCALL                                      0  $71     
        111        IS_EQUAL                                         ~72     $70, $71
        112        BOOL                                             ~69     ~72
        113    > > JMPZ                                                     ~69, ->115
  110   114    >   ASSIGN                                                   !13, !12
  107   115    > > JMP                                                      ->96
        116    >   FE_FREE                                                  $66
  114   117        INIT_METHOD_CALL                                         !13, 'setAttribute'
        118        SEND_VAL_EX                                              'Key'
        119        POST_INC                                         ~74     !5
        120        CONCAT                                           ~75     ~74, 'T'
        121        SEND_VAL_EX                                              ~75
        122        DO_FCALL                                      0          
  116   123        INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
        124        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
        125        SEND_VAL_EX                                              'FareRuleKey'
        126        DO_FCALL                                      0  $77     
        127        INIT_METHOD_CALL                                         $77, 'item'
        128        SEND_VAL_EX                                              0
        129        DO_FCALL                                      0  $78     
        130        INIT_METHOD_CALL                                         $78, 'setAttribute'
        131        SEND_VAL_EX                                              'FareInfoRef'
        132        INIT_METHOD_CALL                                         !13, 'getAttribute'
        133        SEND_VAL_EX                                              'Key'
        134        DO_FCALL                                      0  $79     
        135        SEND_VAR_NO_REF_EX                                       $79
        136        DO_FCALL                                      0          
  120   137        ASSIGN                                                   !14, <false>
  121   138        FETCH_OBJ_R                                      ~82     !6, 'firstChild'
        139        ASSIGN                                                   !7, ~82
  122   140      > JMP                                                      ->155
  123   141    > > JMPNZ_EX                                         ~84     !14, ->145
        142    >   FETCH_OBJ_R                                      ~85     !7, 'nodeName'
        143        IS_EQUAL                                         ~86     ~85, 'air%3APassengerType'
        144        BOOL                                             ~84     ~86
        145    >   ASSIGN                                                   !14, ~84
  124   146        FETCH_OBJ_R                                      ~88     !7, 'nodeName'
        147        IS_EQUAL                                         ~89     ~88, 'air%3APassengerType'
        148        CONCAT                                           ~90     ~89, '%2C+'
        149        FETCH_OBJ_R                                      ~91     !7, 'nodeName'
        150        CONCAT                                           ~92     ~90, ~91
        151        CONCAT                                           ~93     ~92, '%0A'
        152        ECHO                                                     ~93
  125   153        FETCH_OBJ_R                                      ~94     !7, 'nextSibling'
        154        ASSIGN                                                   !7, ~94
  122   155    >   IS_NOT_EQUAL                                             !7, null
        156      > JMPNZ                                                    ~96, ->141
  127   157    > > JMPZ                                                     !14, ->191
  128   158    > > FE_RESET_R                                       $97     !10, ->190
        159    > > FE_FETCH_R                                               $97, !15, ->190
  130   160    >   INIT_METHOD_CALL                                         !15, 'getAttribute'
        161        SEND_VAL_EX                                              'TravelerType'
        162        DO_FCALL                                      0  $98     
        163        INIT_METHOD_CALL                                         !13, 'getAttribute'
        164        SEND_VAL_EX                                              'PassengerTypeCode'
        165        DO_FCALL                                      0  $99     
        166        IS_EQUAL                                                 $98, $99
        167      > JMPZ                                                     ~100, ->189
  132   168    >   INIT_METHOD_CALL                                         !1, 'createElement'
        169        SEND_VAL_EX                                              'air%3APassengerType'
        170        DO_FCALL                                      0  $101    
        171        ASSIGN                                                   !16, $101
  133   172        INIT_METHOD_CALL                                         !16, 'setAttribute'
        173        SEND_VAL_EX                                              'Code'
        174        INIT_METHOD_CALL                                         !15, 'getAttribute'
        175        SEND_VAL_EX                                              'TravelerType'
        176        DO_FCALL                                      0  $103    
        177        SEND_VAR_NO_REF_EX                                       $103
        178        DO_FCALL                                      0          
  134   179        INIT_METHOD_CALL                                         !16, 'setAttribute'
        180        SEND_VAL_EX                                              'BookingTravelerRef'
        181        INIT_METHOD_CALL                                         !15, 'getAttribute'
        182        SEND_VAL_EX                                              'Key'
        183        DO_FCALL                                      0  $105    
        184        SEND_VAR_NO_REF_EX                                       $105
        185        DO_FCALL                                      0          
  135   186        INIT_METHOD_CALL                                         !6, 'appendChild'
        187        SEND_VAR_EX                                              !16
        188        DO_FCALL                                      0          
  128   189    > > JMP                                                      ->159
        190    >   FE_FREE                                                  $97
  142   191    >   INIT_METHOD_CALL                                         !1, 'createElement'
        192        SEND_VAL_EX                                              'air%3ABookingInfo'
        193        DO_FCALL                                      0  $108    
        194        ASSIGN                                                   !17, $108
  143   195        INIT_METHOD_CALL                                         !17, 'setAttribute'
        196        SEND_VAL_EX                                              'BookingCode'
        197        INIT_METHOD_CALL                                         !11, 'getAttribute'
        198        SEND_VAL_EX                                              'ClassOfService'
        199        DO_FCALL                                      0  $110    
        200        SEND_VAR_NO_REF_EX                                       $110
        201        DO_FCALL                                      0          
  144   202        INIT_METHOD_CALL                                         !17, 'setAttribute'
        203        SEND_VAL_EX                                              'FareInfoRef'
        204        INIT_METHOD_CALL                                         !13, 'getAttribute'
        205        SEND_VAL_EX                                              'Key'
        206        DO_FCALL                                      0  $112    
        207        SEND_VAR_NO_REF_EX                                       $112
        208        DO_FCALL                                      0          
  145   209        INIT_METHOD_CALL                                         !17, 'setAttribute'
        210        SEND_VAL_EX                                              'SegmentRef'
        211        INIT_METHOD_CALL                                         !11, 'getAttribute'
        212        SEND_VAL_EX                                              'Key'
        213        DO_FCALL                                      0  $114    
        214        SEND_VAR_NO_REF_EX                                       $114
        215        DO_FCALL                                      0          
  146   216        INIT_METHOD_CALL                                         !6, 'appendChild'
        217        SEND_VAR_EX                                              !17
        218        DO_FCALL                                      0          
  105   219      > JMP                                                      ->90
        220    >   FE_FREE                                                  $64
  104   221      > JMP                                                      ->88
        222    >   FE_FREE                                                  $63
  149   223        INIT_METHOD_CALL                                         !1, 'saveXml'
        224        DO_FCALL                                      0  $117    
        225        CONCAT                                           ~118    $117, '%0A'
        226        ECHO                                                     ~118
  150   227      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.43 ms | 1414 KiB | 13 Q