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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.61 ms | 1414 KiB | 13 Q