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)); } $oSegmentNodes = $oAirPricingSolutionNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirSegment'); $oTravelerNodes = $oMain->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_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")); # 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")); $oBookingInfoNodeNode = $oMain->importNode($oBookingInfoNode, TRUE); $oAirPricingInfoNode->appendChild($oBookingInfoNodeNode); # Add passenger type information if none exist yet. if (0 == $oAirPricingInfoNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'PassengerType')->length) { 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")); $oBookingInfoNode->appendChild($oMain->importNode($oPassengerTypeNode, TRUE)); } } } } } 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 = 83, Position 2 = 212
Branch analysis from position: 83
2 jumps found. (Code = 78) Position 1 = 84, Position 2 = 212
Branch analysis from position: 84
2 jumps found. (Code = 77) Position 1 = 85, Position 2 = 210
Branch analysis from position: 85
2 jumps found. (Code = 78) Position 1 = 86, Position 2 = 210
Branch analysis from position: 86
2 jumps found. (Code = 77) Position 1 = 91, Position 2 = 111
Branch analysis from position: 91
2 jumps found. (Code = 78) Position 1 = 92, Position 2 = 111
Branch analysis from position: 92
2 jumps found. (Code = 46) Position 1 = 100, Position 2 = 108
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 110
Branch analysis from position: 109
1 jumps found. (Code = 42) Position 1 = 91
Branch analysis from position: 91
Branch analysis from position: 110
Branch analysis from position: 108
Branch analysis from position: 111
2 jumps found. (Code = 43) Position 1 = 172, Position 2 = 209
Branch analysis from position: 172
2 jumps found. (Code = 77) Position 1 = 173, Position 2 = 208
Branch analysis from position: 173
2 jumps found. (Code = 78) Position 1 = 174, Position 2 = 208
Branch analysis from position: 174
2 jumps found. (Code = 43) Position 1 = 182, Position 2 = 207
Branch analysis from position: 182
1 jumps found. (Code = 42) Position 1 = 173
Branch analysis from position: 173
Branch analysis from position: 207
Branch analysis from position: 208
1 jumps found. (Code = 42) Position 1 = 85
Branch analysis from position: 85
Branch analysis from position: 208
Branch analysis from position: 209
Branch analysis from position: 111
Branch analysis from position: 210
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 210
Branch analysis from position: 212
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 212
Branch analysis from position: 71
filename:       /in/9MeVh
function name:  (null)
number of ops:  218
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 = $oBookingInfoNode, !15 = $oBookingInfoNodeNode, !16 = $oTravelerNode, !17 = $oPassengerTypeNode
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                                         !2, 'getElementsByTagNameNs'
         73        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         74        SEND_VAL_EX                                              'AirSegment'
         75        DO_FCALL                                      0  $57     
         76        ASSIGN                                                   !9, $57
  100    77        INIT_METHOD_CALL                                         !1, 'getElementsByTagNameNs'
         78        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         79        SEND_VAL_EX                                              'BookingTraveler'
         80        DO_FCALL                                      0  $59     
         81        ASSIGN                                                   !10, $59
  102    82      > FE_RESET_R                                       $61     !9, ->212
         83    > > FE_FETCH_R                                               $61, !11, ->212
  103    84    > > FE_RESET_R                                       $62     !4, ->210
         85    > > FE_FETCH_R                                               $62, !6, ->210
  105    86    >   INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
         87        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
         88        SEND_VAL_EX                                              'FareInfo'
         89        DO_FCALL                                      0  $63     
         90      > FE_RESET_R                                       $64     $63, ->111
         91    > > FE_FETCH_R                                               $64, !12, ->111
  106    92    >   INIT_METHOD_CALL                                         !12, 'getAttribute'
         93        SEND_VAL_EX                                              'SegmentOrigin'
         94        DO_FCALL                                      0  $65     
         95        INIT_METHOD_CALL                                         !11, 'getAttribute'
         96        SEND_VAL_EX                                              'Origin'
         97        DO_FCALL                                      0  $66     
         98        IS_EQUAL                                         ~67     $65, $66
         99      > JMPZ_EX                                          ~67     ~67, ->108
  107   100    >   INIT_METHOD_CALL                                         !12, 'getAttribute'
        101        SEND_VAL_EX                                              'SegmentDestination'
        102        DO_FCALL                                      0  $68     
        103        INIT_METHOD_CALL                                         !11, 'getAttribute'
        104        SEND_VAL_EX                                              'Destination'
        105        DO_FCALL                                      0  $69     
        106        IS_EQUAL                                         ~70     $68, $69
        107        BOOL                                             ~67     ~70
        108    > > JMPZ                                                     ~67, ->110
  108   109    >   ASSIGN                                                   !13, !12
  105   110    > > JMP                                                      ->91
        111    >   FE_FREE                                                  $64
  112   112        INIT_METHOD_CALL                                         !13, 'setAttribute'
        113        SEND_VAL_EX                                              'Key'
        114        POST_INC                                         ~72     !5
        115        CONCAT                                           ~73     ~72, 'T'
        116        SEND_VAL_EX                                              ~73
        117        DO_FCALL                                      0          
  114   118        INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
        119        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
        120        SEND_VAL_EX                                              'FareRuleKey'
        121        DO_FCALL                                      0  $75     
        122        INIT_METHOD_CALL                                         $75, 'item'
        123        SEND_VAL_EX                                              0
        124        DO_FCALL                                      0  $76     
        125        INIT_METHOD_CALL                                         $76, 'setAttribute'
        126        SEND_VAL_EX                                              'FareInfoRef'
        127        INIT_METHOD_CALL                                         !13, 'getAttribute'
        128        SEND_VAL_EX                                              'Key'
        129        DO_FCALL                                      0  $77     
        130        SEND_VAR_NO_REF_EX                                       $77
        131        DO_FCALL                                      0          
  116   132        INIT_METHOD_CALL                                         !1, 'createElement'
        133        SEND_VAL_EX                                              'air%3ABookingInfo'
        134        DO_FCALL                                      0  $79     
        135        ASSIGN                                                   !14, $79
  117   136        INIT_METHOD_CALL                                         !14, 'setAttribute'
        137        SEND_VAL_EX                                              'BookingCode'
        138        INIT_METHOD_CALL                                         !11, 'getAttribute'
        139        SEND_VAL_EX                                              'ClassOfService'
        140        DO_FCALL                                      0  $81     
        141        SEND_VAR_NO_REF_EX                                       $81
        142        DO_FCALL                                      0          
  118   143        INIT_METHOD_CALL                                         !14, 'setAttribute'
        144        SEND_VAL_EX                                              'FareInfoRef'
        145        INIT_METHOD_CALL                                         !13, 'getAttribute'
        146        SEND_VAL_EX                                              'Key'
        147        DO_FCALL                                      0  $83     
        148        SEND_VAR_NO_REF_EX                                       $83
        149        DO_FCALL                                      0          
  119   150        INIT_METHOD_CALL                                         !14, 'setAttribute'
        151        SEND_VAL_EX                                              'SegmentRef'
        152        INIT_METHOD_CALL                                         !11, 'getAttribute'
        153        SEND_VAL_EX                                              'Key'
        154        DO_FCALL                                      0  $85     
        155        SEND_VAR_NO_REF_EX                                       $85
        156        DO_FCALL                                      0          
  120   157        INIT_METHOD_CALL                                         !1, 'importNode'
        158        SEND_VAR_EX                                              !14
        159        SEND_VAL_EX                                              <true>
        160        DO_FCALL                                      0  $87     
        161        ASSIGN                                                   !15, $87
  121   162        INIT_METHOD_CALL                                         !6, 'appendChild'
        163        SEND_VAR_EX                                              !15
        164        DO_FCALL                                      0          
  123   165        INIT_METHOD_CALL                                         !6, 'getElementsByTagNameNs'
        166        SEND_VAL_EX                                              'http%3A%2F%2Fwww.travelport.com%2Fschema%2Fair_v22_0'
        167        SEND_VAL_EX                                              'PassengerType'
        168        DO_FCALL                                      0  $90     
        169        FETCH_OBJ_R                                      ~91     $90, 'length'
        170        IS_EQUAL                                                 ~91, 0
        171      > JMPZ                                                     ~92, ->209
  124   172    > > FE_RESET_R                                       $93     !10, ->208
        173    > > FE_FETCH_R                                               $93, !16, ->208
  126   174    >   INIT_METHOD_CALL                                         !16, 'getAttribute'
        175        SEND_VAL_EX                                              'TravelerType'
        176        DO_FCALL                                      0  $94     
        177        INIT_METHOD_CALL                                         !13, 'getAttribute'
        178        SEND_VAL_EX                                              'PassengerTypeCode'
        179        DO_FCALL                                      0  $95     
        180        IS_EQUAL                                                 $94, $95
        181      > JMPZ                                                     ~96, ->207
  128   182    >   INIT_METHOD_CALL                                         !1, 'createElement'
        183        SEND_VAL_EX                                              'air%3APassengerType'
        184        DO_FCALL                                      0  $97     
        185        ASSIGN                                                   !17, $97
  129   186        INIT_METHOD_CALL                                         !17, 'setAttribute'
        187        SEND_VAL_EX                                              'Code'
        188        INIT_METHOD_CALL                                         !16, 'getAttribute'
        189        SEND_VAL_EX                                              'TravelerType'
        190        DO_FCALL                                      0  $99     
        191        SEND_VAR_NO_REF_EX                                       $99
        192        DO_FCALL                                      0          
  130   193        INIT_METHOD_CALL                                         !17, 'setAttribute'
        194        SEND_VAL_EX                                              'BookingTravelerRef'
        195        INIT_METHOD_CALL                                         !16, 'getAttribute'
        196        SEND_VAL_EX                                              'Key'
        197        DO_FCALL                                      0  $101    
        198        SEND_VAR_NO_REF_EX                                       $101
        199        DO_FCALL                                      0          
  131   200        INIT_METHOD_CALL                                         !14, 'appendChild'
        201        INIT_METHOD_CALL                                         !1, 'importNode'
        202        SEND_VAR_EX                                              !17
        203        SEND_VAL_EX                                              <true>
        204        DO_FCALL                                      0  $103    
        205        SEND_VAR_NO_REF_EX                                       $103
        206        DO_FCALL                                      0          
  124   207    > > JMP                                                      ->173
        208    >   FE_FREE                                                  $93
  103   209    > > JMP                                                      ->85
        210    >   FE_FREE                                                  $62
  102   211      > JMP                                                      ->83
        212    >   FE_FREE                                                  $61
  137   213        INIT_METHOD_CALL                                         !1, 'saveXml'
        214        DO_FCALL                                      0  $105    
        215        CONCAT                                           ~106    $105, '%0A'
        216        ECHO                                                     ~106
  138   217      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.84 ms | 1423 KiB | 13 Q