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 = $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; } } echo $oAirPricingInfoNode->saveXml() . "\n"; //$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.0110.00719.21
8.3.30.0120.00918.91
8.3.20.0080.00019.07
8.3.10.0040.00421.16
8.3.00.0080.00023.68
8.2.170.0120.00322.96
8.2.160.0100.00320.63
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.45
8.2.110.0070.01120.71
8.2.100.0000.01218.03
8.2.90.0060.00319.52
8.2.80.0070.00019.65
8.2.70.0030.00617.75
8.2.60.0050.00318.16
8.2.50.0050.00318.07
8.2.40.0000.00818.34
8.2.30.0040.00421.46
8.2.20.0000.00818.08
8.2.10.0040.00417.95
8.2.00.0000.00818.12
8.1.270.0030.00523.99
8.1.260.0140.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00622.79
8.1.230.0070.00421.25
8.1.220.0000.00818.77
8.1.210.0030.00719.15
8.1.200.0030.00617.73
8.1.190.0050.00317.77
8.1.180.0040.00418.10
8.1.170.0080.00020.55
8.1.160.0040.00419.16
8.1.150.0040.00418.92
8.1.140.0040.00417.62
8.1.130.0030.00318.09
8.1.120.0040.00417.72
8.1.110.0040.00417.76
8.1.100.0040.00417.59
8.1.90.0050.00217.64
8.1.80.0070.00017.63
8.1.70.0030.00317.79
8.1.60.0030.00617.80
8.1.50.0000.00817.60
8.1.40.0030.00517.82
8.1.30.0030.00617.82
8.1.20.0080.00017.98
8.1.10.0030.00517.80
8.1.00.0060.00317.72
8.0.300.0100.00020.28
8.0.290.0070.00017.55
8.0.280.0030.00318.66
8.0.270.0000.00717.46
8.0.260.0030.00317.06
8.0.250.0050.00317.34
8.0.240.0070.00017.11
8.0.230.0000.00817.23
8.0.220.0000.00717.27
8.0.210.0030.00317.11
8.0.200.0000.00817.28
8.0.190.0050.00317.17
8.0.180.0060.00317.16
8.0.170.0050.00317.12
8.0.160.0060.00317.10
8.0.150.0110.00017.18
8.0.140.0040.00417.01
8.0.130.0000.00613.62
8.0.120.0040.00417.08
8.0.110.0040.00417.18
8.0.100.0040.00417.05
8.0.90.0050.00217.20
8.0.80.0150.00617.18
8.0.70.0000.00717.03
8.0.60.0040.00417.16
8.0.50.0040.00417.21
8.0.30.0090.00917.30
8.0.20.0180.00517.49
8.0.10.0040.00417.23
8.0.00.0110.00917.01
7.4.330.0000.00516.89
7.4.320.0000.00616.80
7.4.300.0030.00316.67
7.4.290.0000.00716.79
7.4.280.0100.00016.75
7.4.270.0030.00316.79
7.4.260.0050.00013.53
7.4.250.0040.00416.80
7.4.240.0030.00616.77
7.4.230.0040.00416.75
7.4.220.0090.00916.81
7.4.210.0060.01016.87
7.4.200.0030.00616.73
7.4.190.0000.00716.92
7.4.160.0130.00316.66
7.4.150.0140.00417.40
7.4.140.0120.00817.86
7.4.130.0090.00816.84
7.4.120.0110.01016.88
7.4.110.0110.00716.83
7.4.100.0090.00916.68
7.4.90.0040.01416.72
7.4.80.0090.01219.39
7.4.70.0070.01016.84
7.4.60.0070.01016.88
7.4.50.0060.00316.75
7.4.40.0070.00422.77
7.4.30.0030.01516.93
7.4.00.0100.00715.00
7.3.330.0050.00013.52
7.3.320.0060.00013.29
7.3.310.0050.00316.57
7.3.300.0040.00416.53
7.3.290.0060.00816.68
7.3.280.0060.00916.67
7.3.270.0140.00517.40
7.3.260.0120.00818.24
7.3.250.0110.00716.76
7.3.240.0180.00816.62
7.3.230.0170.00616.59
7.3.210.0030.01316.69
7.3.200.0130.01019.39
7.3.190.0090.01216.65
7.3.180.0070.01016.78
7.3.170.0100.00716.84
7.3.160.0070.01416.89
7.3.120.0060.01014.89
7.2.330.0070.01016.97
7.2.320.0120.00917.02
7.2.310.0170.00716.99
7.2.300.0130.00916.71
7.2.290.0070.01016.79
7.2.60.0040.01117.04
7.2.00.0080.00819.63
7.1.200.0070.00715.94
7.1.70.0040.00717.47
7.1.60.0040.00717.41
7.1.50.0030.01017.18
7.1.00.0000.05022.55
7.0.200.0060.00916.77
7.0.140.0000.07722.23
7.0.100.0030.07720.24
7.0.90.0100.08020.23
7.0.80.0100.06020.22
7.0.70.0130.07320.09
7.0.60.0130.07719.93
7.0.50.0030.09020.30
7.0.40.0170.04020.18
7.0.30.0030.08720.09
7.0.20.0030.10020.21
7.0.10.0170.07020.11
7.0.00.0170.07020.09
5.6.280.0000.07721.21
5.6.250.0070.08020.90
5.6.240.0030.08020.70
5.6.230.0070.04720.93
5.6.220.0170.07320.71
5.6.210.0100.07720.62
5.6.200.0030.08321.18
5.6.190.0130.07721.19
5.6.180.0130.07721.06
5.6.170.0070.08321.18
5.6.160.0100.07721.04
5.6.150.0070.04021.14
5.6.140.0170.07321.21
5.6.130.0100.08021.24
5.6.120.0100.07321.16
5.6.110.0170.08021.30
5.6.100.0070.08021.15
5.6.90.0100.08321.16
5.6.80.0100.07320.53
5.6.70.0130.07320.50
5.6.60.0130.07320.49
5.6.50.0100.04320.66
5.6.40.0170.06020.53
5.6.30.0130.04020.50
5.6.20.0070.05720.50
5.6.10.0130.07320.51
5.6.00.0070.08020.54
5.5.380.0130.07320.61
5.5.370.0070.08320.50
5.5.360.0130.08020.62
5.5.350.0070.06320.52
5.5.340.0170.07020.93
5.5.330.0100.07721.09
5.5.320.0230.06320.76
5.5.310.0070.08721.09
5.5.300.0100.07320.80
5.5.290.0070.08020.80
5.5.280.0170.07320.80
5.5.270.0030.08721.07
5.5.260.0070.08020.91
5.5.250.0100.08020.86
5.5.240.0030.08020.45
5.5.230.0030.08320.17
5.5.220.0130.07720.45
5.5.210.0130.07320.33
5.5.200.0030.08020.38
5.5.190.0170.07020.25
5.5.180.0130.06320.42
5.5.160.0000.08320.35
5.5.150.0030.07320.42
5.5.140.0100.07720.18
5.5.130.0030.07720.44
5.5.120.0170.06720.18
5.5.110.0100.07320.20
5.5.100.0100.07720.29
5.5.90.0100.04320.29
5.5.80.0130.06720.18
5.5.70.0000.05720.25
5.5.60.0130.07020.15
5.5.50.0070.07020.14
5.5.40.0070.06320.13
5.5.30.0000.07020.05
5.5.20.0100.05020.13
5.5.10.0130.06320.12
5.5.00.0100.07720.26
5.4.450.0130.07719.57
5.4.440.0130.07719.56
5.4.430.0170.07019.59
5.4.420.0100.07319.55
5.4.410.0100.06719.41
5.4.400.0030.08019.26
5.4.390.0100.07319.23
5.4.380.0030.06019.23
5.4.370.0030.08319.20
5.4.360.0030.08318.95
5.4.350.0070.07719.06
5.4.340.0130.07319.23
5.4.320.0070.07319.24
5.4.310.0070.07719.25
5.4.300.0070.07719.20
5.4.290.0130.07319.20
5.4.280.0070.08318.89
5.4.270.0100.07719.15
5.4.260.0100.06319.25
5.4.250.0100.07319.39
5.4.240.0100.07319.20
5.4.230.0100.07318.89
5.4.220.0000.08019.25
5.4.210.0070.07019.20
5.4.200.0200.06319.21
5.4.190.0100.06719.24
5.4.180.0100.07719.23
5.4.170.0130.06719.23
5.4.160.0030.08318.91
5.4.150.0030.04719.22
5.4.140.0030.08016.54
5.4.130.0130.06316.42
5.4.120.0100.07016.48
5.4.110.0100.06716.39
5.4.100.0100.05716.55
5.4.90.0030.07716.56
5.4.80.0100.07016.54
5.4.70.0170.03316.43
5.4.60.0070.06716.57
5.4.50.0100.06716.48
5.4.40.0100.04716.56
5.4.30.0130.06016.54
5.4.20.0030.05316.44
5.4.10.0070.07316.63
5.4.00.0130.07015.73
5.3.290.0100.07314.78
5.3.280.0030.07714.65
5.3.270.0030.07314.74
5.3.260.0100.07014.80
5.3.250.0130.06314.66
5.3.240.0130.06714.78
5.3.230.0070.07014.73
5.3.220.0100.07314.55
5.3.210.0070.08014.55
5.3.200.0130.07314.67
5.3.190.0070.05314.75
5.3.180.0000.08014.65
5.3.170.0070.07314.76
5.3.160.0030.05014.70
5.3.150.0170.06714.51
5.3.140.0130.07014.51
5.3.130.0070.07014.67
5.3.120.0100.07714.61
5.3.110.0070.07014.75
5.3.100.0070.04314.14
5.3.90.0100.07014.21
5.3.80.0000.06314.10
5.3.70.0070.04014.19
5.3.60.0070.07014.17
5.3.50.0100.06714.00
5.3.40.0170.04014.08
5.3.30.0070.05314.09
5.3.20.0070.04013.81
5.3.10.0030.08013.83
5.3.00.0030.07313.73
5.2.170.0000.04011.43
5.2.160.0030.06311.43
5.2.150.0070.05311.43
5.2.140.0100.05011.43
5.2.130.0100.05711.43
5.2.120.0070.06011.43
5.2.110.0070.06011.43
5.2.100.0030.06311.43
5.2.90.0030.06311.43
5.2.80.0030.06311.43
5.2.70.0070.06011.43
5.2.60.0070.06311.43
5.2.50.0070.06011.43
5.2.40.0070.04311.43
5.2.30.0100.05711.43
5.2.20.0130.05711.43
5.2.10.0070.05311.43
5.2.00.0030.06011.43
5.1.60.0170.04311.43
5.1.50.0130.04711.43
5.1.40.0030.03011.43
5.1.30.0100.05311.43
5.1.20.0000.03711.43
5.1.10.0000.06011.43
5.1.00.0030.05011.43
5.0.50.0030.03311.43
5.0.40.0070.04011.43
5.0.30.0030.06311.43
5.0.20.0000.04711.43
5.0.10.0000.04311.43
5.0.00.0000.06711.43
4.4.90.0030.03311.43
4.4.80.0070.01711.43
4.4.70.0030.03711.43
4.4.60.0030.03311.43
4.4.50.0000.02311.43
4.4.40.0000.04311.43
4.4.30.0000.02711.43
4.4.20.0000.03711.43
4.4.10.0030.03011.43
4.4.00.0030.05711.43
4.3.110.0000.03311.43
4.3.100.0000.03711.43
4.3.90.0030.03311.43
4.3.80.0070.04711.43
4.3.70.0030.03011.43
4.3.60.0030.03311.43
4.3.50.0000.03711.43
4.3.40.0030.03711.43
4.3.30.0000.02011.43
4.3.20.0000.04011.43
4.3.10.0030.03311.43
4.3.00.0030.03311.43

preferences:
45.7 ms | 400 KiB | 5 Q