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) { 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.60.0060.00918.68
8.3.50.0130.00522.11
8.3.40.0070.01118.87
8.3.30.0130.01018.83
8.3.20.0000.00818.85
8.3.10.0050.00321.19
8.3.00.0040.00423.77
8.2.180.0150.00017.00
8.2.170.0080.00822.96
8.2.160.0030.01020.61
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00421.16
8.2.110.0070.00420.90
8.2.100.0080.00417.98
8.2.90.0060.00319.56
8.2.80.0000.00819.66
8.2.70.0060.00317.88
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0050.00318.53
8.2.30.0000.00719.83
8.2.20.0040.00417.88
8.2.10.0000.00818.11
8.2.00.0000.00918.01
8.1.280.0130.00925.92
8.1.270.0040.00423.99
8.1.260.0090.00926.35
8.1.250.0040.00428.09
8.1.240.0030.00622.73
8.1.230.0110.00021.22
8.1.220.0040.00418.77
8.1.210.0100.00019.23
8.1.200.0040.00417.60
8.1.190.0000.00817.78
8.1.180.0000.00818.10
8.1.170.0040.00418.80
8.1.160.0000.00819.10
8.1.150.0030.00618.98
8.1.140.0070.00017.72
8.1.130.0000.00718.07
8.1.120.0030.00517.84
8.1.110.0040.00417.63
8.1.100.0000.00717.64
8.1.90.0040.00417.64
8.1.80.0000.00817.63
8.1.70.0050.00317.71
8.1.60.0040.00417.76
8.1.50.0030.00517.82
8.1.40.0060.00317.78
8.1.30.0080.00017.89
8.1.20.0000.00817.91
8.1.10.0000.00817.73
8.1.00.0000.00817.75
8.0.300.0090.00020.16
8.0.290.0050.00217.30
8.0.280.0000.00818.62
8.0.270.0030.00317.63
8.0.260.0070.00017.14
8.0.250.0040.00417.10
8.0.240.0030.00617.10
8.0.230.0030.00317.10
8.0.220.0030.00317.24
8.0.210.0030.00317.13
8.0.200.0040.00417.11
8.0.190.0000.00817.20
8.0.180.0030.00517.16
8.0.170.0060.00317.07
8.0.160.0000.00917.23
8.0.150.0070.00417.16
8.0.140.0060.00317.18
8.0.130.0060.00013.64
8.0.120.0040.00417.04
8.0.110.0000.00717.20
8.0.100.0030.00516.98
8.0.90.0030.00517.07
8.0.80.0060.01317.21
8.0.70.0040.00416.98
8.0.60.0000.00717.11
8.0.50.0050.00216.95
8.0.30.0100.01017.37
8.0.20.0130.00917.52
8.0.10.0000.00917.31
8.0.00.0120.01216.88
7.4.330.0050.00016.91
7.4.320.0070.00016.88
7.4.300.0000.00616.70
7.4.290.0030.00316.89
7.4.280.0100.00016.70
7.4.270.0070.00016.87
7.4.260.0000.00613.46
7.4.250.0040.00416.85
7.4.240.0030.00316.69
7.4.230.0000.00716.97
7.4.220.0070.01116.65
7.4.210.0060.01216.85
7.4.200.0040.00416.84
7.4.190.0050.00217.01
7.4.160.0040.01216.71
7.4.150.0120.00617.40
7.4.140.0110.01017.86
7.4.130.0100.00916.74
7.4.120.0110.01016.74
7.4.110.0070.01016.82
7.4.100.0110.01116.86
7.4.90.0060.01216.86
7.4.80.0140.00319.39
7.4.70.0130.00316.70
7.4.60.0160.00316.64
7.4.50.0030.00516.70
7.4.40.0060.01222.77
7.4.30.0160.00316.70
7.4.00.0060.01214.99
7.3.330.0050.00013.45
7.3.320.0000.00613.50
7.3.310.0050.00216.63
7.3.300.0070.00016.51
7.3.290.0060.00816.57
7.3.280.0060.01116.62
7.3.270.0000.01717.40
7.3.260.0050.01618.24
7.3.250.0070.01116.77
7.3.240.0140.00616.85
7.3.230.0060.01216.55
7.3.210.0130.00716.89
7.3.200.0000.02119.39
7.3.190.0190.00316.69
7.3.180.0080.00816.59
7.3.170.0090.01216.47
7.3.160.0070.01016.79
7.3.120.0130.00014.72
7.2.330.0060.01116.96
7.2.320.0040.01516.76
7.2.310.0060.01316.76
7.2.300.0070.01416.70
7.2.290.0070.01017.02
7.2.00.0030.01019.73
7.1.100.0000.01118.14
7.1.70.0120.01217.25
7.1.60.0080.00317.39
7.1.50.0070.01117.02
7.1.00.0030.05322.50
7.0.200.0060.00916.96
7.0.140.0030.07322.12
7.0.100.0130.08720.07
7.0.90.0030.09020.01
7.0.80.0330.06720.15
7.0.70.0230.08020.00
7.0.60.0130.07319.93
7.0.50.0230.08720.26
7.0.40.0100.06720.07
7.0.30.0130.07020.24
7.0.20.0070.08320.20
7.0.10.0000.08020.04
7.0.00.0130.08020.14
5.6.280.0100.06721.11
5.6.250.0130.07020.73
5.6.240.0200.04720.80
5.6.230.0100.07020.64
5.6.220.0000.05320.52
5.6.210.0070.05020.60
5.6.200.0100.07721.15
5.6.190.0130.04021.17
5.6.180.0070.07721.24
5.6.170.0170.07721.21
5.6.160.0130.04321.13
5.6.150.0070.08021.07
5.6.140.0130.06321.10
5.6.130.0200.05721.13
5.6.120.0130.08021.19
5.6.110.0070.07721.13
5.6.100.0070.05021.25
5.6.90.0030.08720.96
5.6.80.0130.07020.46
5.6.70.0070.08720.62
5.6.60.0030.08020.49
5.6.50.0070.07320.45
5.6.40.0030.08320.59
5.6.30.0030.07720.60
5.6.20.0030.07720.50
5.6.10.0170.07020.46
5.6.00.0130.06720.41
5.5.380.0030.08320.62
5.5.370.0100.08020.39
5.5.360.0100.05020.39
5.5.350.0130.07320.59
5.5.340.0070.07720.86
5.5.330.0070.07020.95
5.5.320.0100.07021.04
5.5.310.0130.07321.05
5.5.300.0230.06720.94
5.5.290.0000.05720.84
5.5.280.0100.08020.85
5.5.270.0100.04021.00
5.5.260.0100.07320.93
5.5.250.0030.08320.84
5.5.240.0030.08320.30
5.5.230.0130.05720.30
5.5.220.0070.08020.13
5.5.210.0100.04320.40
5.5.200.0000.05020.29
5.5.190.0100.07720.18
5.5.180.0070.08020.16
5.5.160.0170.07020.32
5.5.150.0030.06720.36
5.5.140.0070.07720.16
5.5.130.0130.04320.20
5.5.120.0100.07020.24
5.5.110.0070.06720.39
5.5.100.0000.05320.10
5.5.90.0000.05020.07
5.5.80.0030.08320.20
5.5.70.0030.04020.13
5.5.60.0030.08020.24
5.5.50.0070.07020.11
5.5.40.0130.06720.20
5.5.30.0200.06320.22
5.5.20.0100.06720.10
5.5.10.0070.05320.01
5.5.00.0030.07320.21
5.4.450.0130.08019.56
5.4.440.0070.07319.49
5.4.430.0070.08019.38
5.4.420.0100.05019.54
5.4.410.0130.07019.60
5.4.400.0030.04718.93
5.4.390.0070.04019.23
5.4.380.0170.06719.22
5.4.370.0130.07319.23
5.4.360.0070.04319.14
5.4.350.0130.05719.14
5.4.340.0070.06319.21
5.4.320.0000.05319.07
5.4.310.0000.07318.92
5.4.300.0130.05319.05
5.4.290.0070.07319.23
5.4.280.0100.07019.26
5.4.270.0170.06319.23
5.4.260.0030.04719.14
5.4.250.0070.07319.15
5.4.240.0000.08019.19
5.4.230.0070.07719.22
5.4.220.0070.08018.91
5.4.210.0070.04719.05
5.4.200.0070.07718.93
5.4.190.0070.04719.20
5.4.180.0130.04019.04
5.4.170.0100.08019.05
5.4.160.0170.06719.18
5.4.150.0130.07019.13
5.4.140.0100.06316.55
5.4.130.0030.07716.50
5.4.120.0070.04016.45
5.4.110.0070.07016.59
5.4.100.0030.07716.47
5.4.90.0100.06716.55
5.4.80.0070.06716.49
5.4.70.0130.05716.54
5.4.60.0130.06316.49
5.4.50.0000.06716.55
5.4.40.0100.07316.48
5.4.30.0000.07016.53
5.4.20.0030.07316.56
5.4.10.0200.05316.48
5.4.00.0070.03715.85
5.3.290.0070.08314.78
5.3.280.0100.03314.55
5.3.270.0070.04714.66
5.3.260.0100.07714.57
5.3.250.0000.04714.70
5.3.240.0030.04714.73
5.3.230.0100.07314.73
5.3.220.0100.07014.54
5.3.210.0070.07314.51
5.3.200.0030.08314.73
5.3.190.0070.07714.72
5.3.180.0070.04314.68
5.3.170.0000.05014.54
5.3.160.0070.07314.66
5.3.150.0100.06314.68
5.3.140.0070.06714.55
5.3.130.0030.07314.68
5.3.120.0070.07714.66
5.3.110.0100.05714.68
5.3.100.0070.07714.20
5.3.90.0070.08014.02
5.3.80.0130.06313.99
5.3.70.0070.07014.16
5.3.60.0130.06714.12
5.3.50.0070.07014.07
5.3.40.0100.07014.05
5.3.30.0130.06014.04
5.3.20.0100.06713.86
5.3.10.0000.07713.56
5.3.00.0030.05313.75
5.2.170.0070.06311.37
5.2.160.0030.06711.34
5.2.150.0030.06711.38
5.2.140.0100.05711.33
5.2.130.0030.06311.22
5.2.120.0100.05311.21
5.2.110.0000.05711.30
5.2.100.0030.06011.29
5.2.90.0030.06311.33
5.2.80.0030.06311.14
5.2.70.0100.03011.33
5.2.60.0070.06311.17
5.2.50.0100.05711.13
5.2.40.0100.05311.11
5.2.30.0070.06011.17
5.2.20.0100.05710.92
5.2.10.0000.06011.07
5.2.00.0030.06010.76
5.1.60.0070.05710.26
5.1.50.0100.02010.13
5.1.40.0000.02710.20
5.1.30.0030.02710.37
5.1.20.0030.03010.41
5.1.10.0000.03010.17
5.1.00.0030.02310.19
5.0.50.0000.0239.55
5.0.40.0070.0139.55
5.0.30.0000.0309.55
5.0.20.0000.0239.55
5.0.10.0000.0209.55
5.0.00.0000.0309.55
4.4.90.0000.0339.55
4.4.80.0000.0279.55
4.4.70.0070.0239.55
4.4.60.0000.0379.55
4.4.50.0030.0239.55
4.4.40.0000.0309.55
4.4.30.0030.0139.55
4.4.20.0000.0179.55
4.4.10.0000.0179.55
4.4.00.0030.0239.55
4.3.110.0100.0039.55
4.3.100.0000.0179.55
4.3.90.0030.0139.55
4.3.80.0030.0209.55
4.3.70.0030.0179.55
4.3.60.0030.0139.55
4.3.50.0030.0139.55
4.3.40.0000.0309.55
4.3.30.0000.0179.55
4.3.20.0000.0179.55
4.3.10.0000.0139.55
4.3.00.0000.0179.55

preferences:
52 ms | 401 KiB | 5 Q