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" Origin="AMS" 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" Origin="ROM" 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" Origin="AMS" 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" Origin="ROM" 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" Origin="AMS" 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" Origin="ROM" 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>'; $oNodesEncapsulated = new DOMDocument(); $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; } # Loop over air:PricingInfo node selection foreach($oAirPricingInfoNodes as $oAirPricingInfoNode) { # Remove all nodes except the fareInfo nodes $oCurrentNode = $oAirPricingInfoNodes->firstChild; while(NULL !== $oCurrentNode) { echo $oCurrentNode->nodeName; $oCurrentNode = $oCurrentNode->nextSibling; } //$oAirPricingSolutionNode->appendChild($this->importNode($oAirPricingInfoNode, TRUE)); } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.40.0150.00319.09
8.3.30.0140.00718.91
8.3.20.0040.00419.07
8.3.10.0080.00021.24
8.3.00.0040.00423.82
8.2.170.0140.00022.96
8.2.160.0000.01420.76
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00421.38
8.2.110.0060.00321.48
8.2.100.0070.00418.29
8.2.90.0000.00918.34
8.2.80.0050.00319.66
8.2.70.0030.00517.88
8.2.60.0060.00318.18
8.2.50.0080.00018.07
8.2.40.0060.00318.47
8.2.30.0070.00019.82
8.2.20.0040.00419.67
8.2.10.0050.00318.13
8.2.00.0000.00918.11
8.1.270.0050.00323.99
8.1.260.0180.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00424.04
8.1.230.0090.00321.27
8.1.220.0000.00818.14
8.1.210.0030.00619.22
8.1.200.0060.00317.50
8.1.190.0040.00417.80
8.1.180.0050.00318.10
8.1.170.0040.00418.89
8.1.160.0000.00819.22
8.1.150.0000.00718.96
8.1.140.0050.00317.73
8.1.130.0000.00818.11
8.1.120.0000.00717.66
8.1.110.0000.00817.71
8.1.100.0000.00717.66
8.1.90.0050.00317.82
8.1.80.0000.00817.73
8.1.70.0040.00417.63
8.1.60.0000.00917.72
8.1.50.0040.00417.83
8.1.40.0080.00017.67
8.1.30.0060.00317.96
8.1.20.0050.00317.91
8.1.10.0000.00717.86
8.1.00.0030.00617.90
8.0.300.0000.00820.51
8.0.290.0030.00617.55
8.0.280.0030.00318.66
8.0.270.0000.00817.50
8.0.260.0000.00717.04
8.0.250.0040.00417.32
8.0.240.0030.00617.16
8.0.230.0050.00217.33
8.0.220.0030.00317.11
8.0.210.0070.00017.14
8.0.200.0040.00417.20
8.0.190.0040.00417.18
8.0.180.0040.00417.13
8.0.170.0040.00417.22
8.0.160.0040.00417.11
8.0.150.0070.00317.07
8.0.140.0000.00817.19
8.0.130.0060.00013.70
8.0.120.0030.00517.12
8.0.110.0000.00717.07
8.0.100.0050.00317.31
8.0.90.0040.00417.15
8.0.80.0060.00917.18
8.0.70.0000.00717.15
8.0.60.0050.00317.14
8.0.50.0040.00417.17
8.0.30.0060.01317.46
8.0.20.0090.01317.40
8.0.10.0020.00517.42
8.0.00.0180.00517.11
7.4.330.0000.00516.90
7.4.320.0060.00016.87
7.4.300.0000.00716.86
7.4.290.0070.00016.89
7.4.280.0060.00316.70
7.4.270.0000.00816.86
7.4.260.0060.00013.51
7.4.250.0050.00316.84
7.4.240.0050.00316.80
7.4.230.0070.00016.65
7.4.220.0170.00316.80
7.4.210.0060.01016.89
7.4.200.0060.00316.62
7.4.190.0000.00716.97
7.4.160.0130.00316.75
7.4.150.0120.00717.40
7.4.140.0120.00917.86
7.4.130.0050.01316.85
7.4.120.0100.01016.78
7.4.110.0140.00416.83
7.4.100.0110.01016.76
7.4.90.0000.01716.75
7.4.80.0070.01019.39
7.4.70.0080.01216.81
7.4.60.0070.01516.83
7.4.50.0080.00016.92
7.4.40.0100.00322.77
7.4.30.0070.01016.55
7.4.10.0080.00615.85
7.4.00.0060.01015.64
7.3.330.0000.00513.55
7.3.320.0030.00313.49
7.3.310.0000.00716.75
7.3.300.0030.00316.62
7.3.290.0080.01216.62
7.3.280.0080.00916.65
7.3.270.0120.01317.40
7.3.260.0070.01118.24
7.3.250.0090.00816.80
7.3.240.0150.00616.60
7.3.230.0150.00616.93
7.3.210.0130.00416.86
7.3.200.0100.01319.39
7.3.190.0160.00916.71
7.3.180.0100.00616.56
7.3.170.0060.01516.79
7.3.160.0030.01916.65
7.3.130.0050.01115.82
7.3.120.0060.01015.46
7.3.110.0050.01315.89
7.3.100.0030.00915.78
7.3.90.0050.00915.69
7.3.80.0070.00515.79
7.3.70.0070.00515.74
7.3.60.0080.00515.67
7.3.50.0050.00915.93
7.3.40.0090.00615.76
7.3.30.0030.01115.87
7.3.20.0060.00817.56
7.3.10.0010.01217.63
7.3.00.0100.00617.65
7.2.330.0070.01016.78
7.2.320.0100.00716.98
7.2.310.0110.00716.73
7.2.300.0040.02216.99
7.2.290.0090.01216.80
7.2.260.0070.00916.19
7.2.250.0110.00815.88
7.2.240.0050.01216.08
7.2.230.0080.00916.27
7.2.220.0050.00716.19
7.2.210.0050.00816.08
7.2.200.0060.00916.01
7.2.190.0100.00515.97
7.2.180.0030.00916.14
7.2.170.0080.00716.11
7.2.160.0120.00316.07
7.2.150.0080.00317.96
7.2.140.0100.00517.76
7.2.130.0030.01017.94
7.2.120.0060.00917.72
7.2.110.0100.00517.92
7.2.100.0040.00918.04
7.2.90.0080.00717.80
7.2.80.0070.00917.93
7.2.70.0050.01317.85
7.2.60.0080.00817.75
7.2.50.0060.00817.74
7.2.40.0030.00818.04
7.2.30.0060.00918.01
7.2.20.0100.00217.85
7.2.10.0090.00717.89
7.2.00.0050.01118.54
7.1.330.0070.00716.86
7.1.320.0040.00816.66
7.1.310.0060.00816.70
7.1.300.0090.00616.82
7.1.290.0050.00816.71
7.1.280.0070.00516.73
7.1.270.0040.00716.62
7.1.260.0040.00816.79
7.1.250.0030.00816.86
7.1.240.0080.00516.79
7.1.230.0050.01116.89
7.1.220.0090.00616.70
7.1.210.0030.01016.78
7.1.200.0060.00916.67
7.1.190.0030.01016.79
7.1.180.0090.00516.76
7.1.170.0070.00716.78
7.1.160.0100.00316.75
7.1.150.0020.01316.82
7.1.140.0050.00916.60
7.1.130.0050.00716.89
7.1.120.0050.00916.78
7.1.110.0050.00816.80
7.1.100.0080.00617.30
7.1.90.0070.00716.68
7.1.80.0070.00616.83
7.1.70.0040.00716.88
7.1.60.0040.01317.57
7.1.50.0140.00416.89
7.1.40.0060.00916.80
7.1.30.0040.00816.94
7.1.20.0080.00316.83
7.1.10.0020.01016.78
7.1.00.0080.02618.74
7.0.330.0030.00716.39
7.0.320.0060.00616.42
7.0.310.0070.00916.42
7.0.300.0060.00616.37
7.0.290.0080.00716.43
7.0.280.0070.00716.45
7.0.270.0080.00416.51
7.0.260.0090.00216.52
7.0.250.0060.00616.46
7.0.240.0060.00816.55
7.0.230.0040.00516.33
7.0.220.0030.00716.35
7.0.210.0080.00816.50
7.0.200.0010.01016.59
7.0.190.0050.01016.49
7.0.180.0050.00716.44
7.0.170.0030.00616.32
7.0.160.0040.00716.46
7.0.150.0060.00816.54
7.0.140.0020.03218.30
7.0.130.0060.00816.41
7.0.120.0060.01016.42
7.0.110.0070.00816.48
7.0.100.0070.00516.44
7.0.90.0040.00616.41
7.0.80.0030.00816.32
7.0.70.0080.00516.47
7.0.60.0060.03617.73
7.0.50.0090.03116.96
7.0.40.0060.03016.46
7.0.30.0110.03416.25
7.0.20.0140.02816.44
7.0.10.0030.03916.42
7.0.00.0070.03016.39
5.6.400.0070.00815.45
5.6.390.0060.00815.37
5.6.380.0080.00515.43
5.6.370.0100.00715.32
5.6.360.0100.00315.38
5.6.350.0080.00515.14
5.6.340.0020.00815.44
5.6.330.0070.00915.29
5.6.320.0010.00915.28
5.6.310.0050.01015.26
5.6.300.0050.00615.47
5.6.290.0050.00915.61
5.6.280.0050.02917.36
5.6.270.0050.00715.35
5.6.260.0120.00315.37
5.6.250.0050.01015.43
5.6.240.0110.00315.35
5.6.230.0040.01115.27
5.6.220.0040.01015.23
5.6.210.0050.03317.16
5.6.200.0090.03016.15
5.6.190.0070.02217.34
5.6.180.0180.02717.03
5.6.170.0140.02817.11
5.6.160.0050.03217.13
5.6.150.0110.02916.23
5.6.140.0100.03216.27
5.6.130.0070.03316.29
5.6.120.0030.02017.21
5.6.110.0130.02917.26
5.6.100.0070.03317.39
5.6.90.0100.03117.08
5.6.80.0090.01717.01
5.6.70.0050.01015.32
5.6.60.0030.00915.46
5.6.50.0020.01515.29
5.6.40.0050.00915.18
5.6.30.0050.01015.31
5.6.20.0090.00615.35
5.6.10.0050.00715.29
5.6.00.0090.00615.01
5.5.380.0030.01315.21
5.5.370.0060.00615.19
5.5.360.0090.00415.19
5.5.350.1380.02017.00
5.5.340.0070.01916.24
5.5.330.0050.02517.14
5.5.320.0060.01916.80
5.5.310.0150.01516.81
5.5.300.0090.03216.18
5.5.290.0090.03516.19
5.5.280.0080.02917.21
5.5.270.0110.01917.13
5.5.260.0050.01917.12
5.5.250.0030.02217.04
5.5.240.0150.03116.86
5.5.230.0080.00615.16
5.5.220.0040.00815.10
5.5.210.0060.00915.12
5.5.200.0060.00915.35
5.5.190.0060.00815.27
5.5.180.0080.00715.27
5.5.170.0030.00915.20
5.5.160.0050.00815.22
5.5.150.0100.00315.33
5.5.140.0020.01015.26
5.5.130.0110.00315.27
5.5.120.0100.00615.05
5.5.110.0030.01115.17
5.5.100.0050.00915.15
5.5.90.0060.00815.35
5.5.80.0060.00715.15
5.5.70.0090.00315.23
5.5.60.0050.01015.18
5.5.50.0080.00815.30
5.5.40.0080.00814.98
5.5.30.0060.01115.15
5.5.20.0080.00815.22
5.5.10.0080.00515.11
5.5.00.0080.00515.20
5.4.450.1260.01614.55
5.4.440.1310.01614.46
5.4.430.1210.01614.60
5.4.420.1300.01514.51
5.4.410.1010.01614.46
5.4.400.1080.02014.42
5.4.390.0040.03114.44
5.4.380.0050.02414.41
5.4.370.1000.01914.44
5.4.360.1320.01814.44
5.4.350.1420.01814.45
5.4.340.1300.01714.41
5.4.330.0040.00712.02
5.4.320.1160.01714.43
5.4.310.1370.01214.42
5.4.300.0060.01514.50
5.4.290.0540.02614.36
5.4.280.1340.01714.37
5.4.270.1170.01314.36
5.4.260.1260.01814.42
5.4.250.1240.01514.33
5.4.240.1020.01914.37
5.4.230.1270.01414.40
5.4.220.1310.01514.40
5.4.210.1190.02114.50
5.4.200.1360.01814.44
5.4.190.1210.01314.35
5.4.180.1040.01514.34
5.4.170.1230.01814.38
5.4.160.1210.01414.31
5.4.150.1240.01514.38
5.4.140.1030.01713.61
5.4.130.1150.01513.55
5.4.120.1210.01713.48
5.4.110.1200.01713.68
5.4.100.1320.02213.61
5.4.90.1180.01813.62
5.4.80.1230.01313.45
5.4.70.1090.01813.60
5.4.60.1320.01613.49
5.4.50.1140.01413.55
5.4.40.1030.01813.57
5.4.30.1000.01913.54
5.4.20.1150.01313.58
5.4.10.1410.02113.59
5.4.00.1100.01713.30
5.3.290.1340.01913.06
5.3.280.1420.02013.05
5.3.270.0970.01713.06
5.3.260.1210.01613.09
5.3.250.1070.02113.09
5.3.240.1120.01813.09
5.3.230.1300.01813.05
5.3.220.1270.01713.10
5.3.210.1060.02013.02
5.3.200.1320.02113.02
5.3.190.1120.01813.10
5.3.180.1120.01813.21
5.3.170.1120.01813.09
5.3.160.1160.02013.18
5.3.150.1230.01513.09
5.3.140.1210.01813.01
5.3.130.1010.01913.17
5.3.120.1010.02013.04
5.3.110.1240.02013.07
5.3.100.1140.01512.88
5.3.90.1190.01812.90
5.3.80.1110.01212.86
5.3.70.1140.01812.79
5.3.60.1120.01612.89
5.3.50.1120.01712.92
5.3.40.1280.02012.83
5.3.30.1230.01412.83
5.3.20.1280.01912.73
5.3.10.1270.01612.67
5.3.00.1180.01612.63
5.2.170.2730.02711.74
5.2.160.2770.02311.74
5.2.150.3100.03011.74
5.2.140.3100.03311.74
5.2.130.2930.02711.74
5.2.120.2700.03011.74
5.2.110.2630.03011.74
5.2.100.2670.03011.74
5.2.90.3030.02711.74
5.2.80.2930.02311.74
5.2.70.3000.03011.74
5.2.60.3500.03011.74
5.2.50.3530.03011.74
5.2.40.2930.02711.74
5.2.30.2830.03011.74
5.2.20.2500.03711.74
5.2.10.3000.02311.74
5.2.00.2900.03311.74
5.1.60.2900.02311.74
5.1.50.3030.02311.74
5.1.40.3030.02011.74
5.1.30.2970.02711.74
5.1.20.2970.02311.74
5.1.10.2600.02311.74
5.1.00.2600.02011.74
5.0.50.1370.02011.74
5.0.40.1300.02311.74
5.0.30.1630.03311.74
5.0.20.1600.02311.74
5.0.10.1500.01711.74
5.0.00.1470.03011.74
4.4.90.1130.01711.74
4.4.80.1330.01311.74
4.4.70.1600.01311.74
4.4.60.1600.02011.74
4.4.50.1630.01711.74
4.4.40.1500.02711.74
4.4.30.1630.01311.74
4.4.20.1600.01711.74
4.4.10.1700.01311.74
4.4.00.1330.02311.74
4.3.110.1600.01711.74
4.3.100.1270.01711.74
4.3.90.1600.01711.74
4.3.80.1530.02311.74
4.3.70.1330.01711.74
4.3.60.1270.01311.74
4.3.50.1370.01711.74
4.3.40.1200.02311.74
4.3.30.0770.02711.74
4.3.20.0830.02311.74
4.3.10.0800.02311.74
4.3.00.0800.01311.74

preferences:
44.27 ms | 400 KiB | 5 Q