3v4l.org

run code in 300+ PHP versions simultaneously
<?php $oPricingInfoNode = new DOMDocument(); $oPricingInfoNode->loadXML(' <air:AirPricingInfo xmlns:air="http://www.travelport.com/schema/air_v22_0" xmlns:com="http://www.travelport.com/schema/common_v19_0" Key="4T" TotalPrice="EUR50.99" BasePrice="EUR2.00" ApproximateTotalPrice="EUR50.99" ApproximateBasePrice="EUR2.0 0" Taxes="EUR48.99" LatestTicketingTime="2013-10-27T23:59:00.000+00:00" PricingMethod="Auto" ProviderCode="1P"> <air:FareInfo Key="6T" FareBasis="PBE604K" PassengerTypeCode="ADT" Origin="BRU" Destination="MAD" EffectiveDate="2013-10-26T20:36: 45.370+02:00" Amount="NUC1.31"> <air:FareRuleKey FareInfoRef="6T" ProviderCode="1P">3Dxtd/jsY9Lo40qgTiQTot3Ga9aZj+SyHmN4mO25YCrug9CQWuP+X2+oD5t4/MZlfXbbvYG4TG43 VNwAhz2PnWmWLv0xpQB8</air:FareRuleKey> </air:FareInfo> <air:FareInfo Key="7T" FareBasis="PBE604K" PassengerTypeCode="ADT" Origin="MAD" Destination="BRU" EffectiveDate="2013-10-26T20:36: 45.370+02:00" Amount="NUC1.31"> <air:FareRuleKey FareInfoRef="7T" ProviderCode="1P">3Dxtd/jsY9Lo40qgTiQTot3Ga9aZj+Syda+Y0VQMYBHug9CQWuP+X2+oD5t4/MZlfXbbvYG4TG43 VNwAhz2PnWmWLv0xpQB8</air:FareRuleKey> </air:FareInfo> <air:BookingInfo BookingCode="P" FareInfoRef="6T" SegmentRef="2T" Origin="BRU" Destination="MAD" /> <air:BookingInfo BookingCode="P" FareInfoRef="7T" SegmentRef="3T" Origin="MAD" Destination="BRU" /> </air:AirPricingInfo>'); # <air:AirPricingModifiers FaresIndicator="PublicAndPrivateFares" /> $oAirPricingModifiersNode = $oPricingInfoNode->createElement("air:AirPricingModifiers"); $oAirPricingModifiersNode->setAttribute("FareIndicator", "PublicAndPrivateFares"); $oPricingInfoNode->insertBefore($oAirPricingModifiersNode, $oPricingInfoNode->firstChild); echo $oPricingInfoNode->firstChild->nodeName;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nUBAK
function name:  (null)
number of ops:  24
compiled vars:  !0 = $oPricingInfoNode, !1 = $oAirPricingModifiersNode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%0A++++++%3Cair%3AAirPricingInfo+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+Key%3D%224T%22+TotalPrice%3D%22EUR50.99%22+BasePrice%3D%22EUR2.00%22+ApproximateTotalPrice%3D%22EUR50.99%22+ApproximateBasePrice%3D%22EUR2.0+0%22+Taxes%3D%22EUR48.99%22+LatestTicketingTime%3D%222013-10-27T23%3A59%3A00.000%2B00%3A00%22+PricingMethod%3D%22Auto%22+ProviderCode%3D%221P%22%3E%0A+++++++++%3Cair%3AFareInfo+Key%3D%226T%22+FareBasis%3D%22PBE604K%22+PassengerTypeCode%3D%22ADT%22+Origin%3D%22BRU%22+Destination%3D%22MAD%22+EffectiveDate%3D%222013-10-26T20%3A36%3A+45.370%2B02%3A00%22+Amount%3D%22NUC1.31%22%3E%0A++++++++++++%3Cair%3AFareRuleKey+FareInfoRef%3D%226T%22+ProviderCode%3D%221P%22%3E3Dxtd%2FjsY9Lo40qgTiQTot3Ga9aZj%2BSyHmN4mO25YCrug9CQWuP%2BX2%2BoD5t4%2FMZlfXbbvYG4TG43%0AVNwAhz2PnWmWLv0xpQB8%3C%2Fair%3AFareRuleKey%3E%0A+++++++++%3C%2Fair%3AFareInfo%3E%0A+++++++++%3Cair%3AFareInfo+Key%3D%227T%22+FareBasis%3D%22PBE604K%22+PassengerTypeCode%3D%22ADT%22+Origin%3D%22MAD%22+Destination%3D%22BRU%22+EffectiveDate%3D%222013-10-26T20%3A36%3A+45.370%2B02%3A00%22+Amount%3D%22NUC1.31%22%3E%0A++++++++++++%3Cair%3AFareRuleKey+FareInfoRef%3D%227T%22+ProviderCode%3D%221P%22%3E3Dxtd%2FjsY9Lo40qgTiQTot3Ga9aZj%2BSyda%2BY0VQMYBHug9CQWuP%2BX2%2BoD5t4%2FMZlfXbbvYG4TG43%0AVNwAhz2PnWmWLv0xpQB8%3C%2Fair%3AFareRuleKey%3E%0A+++++++++%3C%2Fair%3AFareInfo%3E%0A+++++++++%3Cair%3ABookingInfo+BookingCode%3D%22P%22+FareInfoRef%3D%226T%22+SegmentRef%3D%222T%22+Origin%3D%22BRU%22+Destination%3D%22MAD%22+%2F%3E%0A+++++++++%3Cair%3ABookingInfo+BookingCode%3D%22P%22+FareInfoRef%3D%227T%22+SegmentRef%3D%223T%22+Origin%3D%22MAD%22+Destination%3D%22BRU%22+%2F%3E%0A++++++%3C%2Fair%3AAirPricingInfo%3E'
          5        DO_FCALL                                      0          
   19     6        INIT_METHOD_CALL                                         !0, 'createElement'
          7        SEND_VAL_EX                                              'air%3AAirPricingModifiers'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
   20    10        INIT_METHOD_CALL                                         !1, 'setAttribute'
         11        SEND_VAL_EX                                              'FareIndicator'
         12        SEND_VAL_EX                                              'PublicAndPrivateFares'
         13        DO_FCALL                                      0          
   21    14        INIT_METHOD_CALL                                         !0, 'insertBefore'
         15        SEND_VAR_EX                                              !1
         16        CHECK_FUNC_ARG                                           
         17        FETCH_OBJ_FUNC_ARG                               $9      !0, 'firstChild'
         18        SEND_FUNC_ARG                                            $9
         19        DO_FCALL                                      0          
   22    20        FETCH_OBJ_R                                      ~11     !0, 'firstChild'
         21        FETCH_OBJ_R                                      ~12     ~11, 'nodeName'
         22        ECHO                                                     ~12
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.52 ms | 1399 KiB | 13 Q