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->nodeType . " | " . $oCurrentNode->nodeName . "\n"; $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.0040.01118.68
8.3.50.0150.00722.17
8.3.40.0120.00619.11
8.3.30.0100.00518.86
8.3.20.0040.00418.86
8.3.10.0080.00021.02
8.3.00.0040.00422.07
8.2.180.0180.00016.75
8.2.170.0040.01122.96
8.2.160.0180.00020.63
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00626.16
8.2.120.0050.00321.45
8.2.110.0030.00620.72
8.2.100.0040.00818.28
8.2.90.0000.00819.42
8.2.80.0050.00318.18
8.2.70.0040.00417.63
8.2.60.0030.00718.18
8.2.50.0000.00918.07
8.2.40.0000.00818.34
8.2.30.0040.00420.16
8.2.20.0000.00817.91
8.2.10.0000.00818.07
8.2.00.0060.00317.98
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0090.00626.35
8.1.250.0080.00028.09
8.1.240.0090.00022.67
8.1.230.0090.00321.23
8.1.220.0050.00318.77
8.1.210.0080.00019.26
8.1.200.0060.00317.60
8.1.190.0030.00517.78
8.1.180.0080.00018.10
8.1.170.0040.00419.02
8.1.160.0050.00219.05
8.1.150.0000.00718.98
8.1.140.0000.00917.62
8.1.130.0070.00018.14
8.1.120.0040.00417.80
8.1.110.0040.00417.64
8.1.100.0040.00417.80
8.1.90.0040.00417.65
8.1.80.0000.00717.77
8.1.70.0000.00717.66
8.1.60.0050.00317.93
8.1.50.0000.00817.84
8.1.40.0080.00017.72
8.1.30.0040.00417.88
8.1.20.0080.00017.95
8.1.10.0000.00817.84
8.1.00.0000.01217.77
8.0.300.0030.00620.21
8.0.290.0040.00417.30
8.0.280.0050.00218.68
8.0.270.0000.00717.50
8.0.260.0030.00317.07
8.0.250.0050.00317.24
8.0.240.0040.00817.12
8.0.230.0070.00017.27
8.0.220.0040.00417.06
8.0.210.0040.00417.20
8.0.200.0000.00717.27
8.0.190.0000.00817.22
8.0.180.0000.01117.22
8.0.170.0000.00817.23
8.0.160.0000.00717.14
8.0.150.0000.00917.17
8.0.140.0030.00616.95
8.0.130.0050.00013.50
8.0.120.0030.00517.12
8.0.110.0000.00717.25
8.0.100.0000.00716.96
8.0.90.0050.00217.05
8.0.80.0100.01017.18
8.0.70.0040.00417.18
8.0.60.0060.00317.16
8.0.50.0030.00517.20
8.0.30.0130.01417.17
8.0.20.0060.01217.40
8.0.10.0000.00817.08
8.0.00.0080.01116.98
7.4.330.0060.00014.97
7.4.320.0030.00316.94
7.4.300.0000.00616.79
7.4.290.0030.00516.96
7.4.280.0070.00016.74
7.4.270.0000.00716.77
7.4.260.0060.00013.46
7.4.250.0000.00916.74
7.4.240.0000.00716.80
7.4.230.0000.00716.89
7.4.220.0100.01316.85
7.4.210.0090.01016.80
7.4.200.0020.00516.54
7.4.190.0000.00716.86
7.4.160.0090.00616.59
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0090.00916.71
7.4.120.0100.00716.72
7.4.110.0000.01916.74
7.4.100.0100.00716.84
7.4.90.0070.01116.75
7.4.80.0120.00919.37
7.4.70.0040.01416.79
7.4.60.0090.00916.76
7.4.50.0050.00316.45
7.4.40.0100.00322.27
7.4.30.0110.00616.84
7.4.10.0040.01415.13
7.4.00.0070.00815.20
7.3.330.0030.00313.38
7.3.320.0030.00313.45
7.3.310.0040.00416.51
7.3.300.0030.00316.48
7.3.290.0100.01016.59
7.3.280.0090.01016.63
7.3.270.0090.01117.40
7.3.260.0090.00818.24
7.3.250.0060.01516.73
7.3.240.0060.01116.81
7.3.230.0150.01016.83
7.3.210.0070.01016.61
7.3.200.0110.00919.39
7.3.190.0030.01316.61
7.3.180.0090.00916.63
7.3.170.0060.01316.66
7.3.160.0100.00616.77
7.3.130.0130.00615.29
7.3.120.0060.00614.95
7.3.110.0070.01015.10
7.3.100.0070.01115.16
7.3.90.0000.01714.92
7.3.80.0080.00415.04
7.3.70.0090.00314.79
7.3.60.0030.01315.03
7.3.50.0070.00715.07
7.3.40.0030.00915.03
7.3.30.0000.01714.80
7.3.20.0060.00916.88
7.3.10.0080.01016.54
7.3.00.0080.00916.65
7.2.330.0080.01016.71
7.2.320.0110.00816.95
7.2.310.0090.01016.81
7.2.300.0060.01016.73
7.2.290.0030.01317.15
7.2.260.0070.01114.91
7.2.250.0150.00315.26
7.2.240.0070.00715.12
7.2.230.0100.00715.52
7.2.220.0120.00615.46
7.2.210.0060.00614.81
7.2.200.0030.01215.13
7.2.190.0000.01615.08
7.2.180.0070.01015.14
7.2.170.0030.01315.13
7.2.160.0060.00615.26
7.2.150.0090.00617.26
7.2.140.0090.00916.87
7.2.130.0080.01017.06
7.2.120.0080.00816.79
7.2.110.0130.00716.85
7.2.100.0070.01117.02
7.2.90.0150.01017.15
7.2.80.0090.00917.11
7.2.70.0130.00917.11
7.2.60.0100.00816.98
7.2.50.0090.00717.08
7.2.40.0050.00916.94
7.2.30.0110.00716.90
7.2.20.0060.01017.07
7.2.10.0080.00816.97
7.2.00.0090.00817.75
7.1.330.0040.00816.21
7.1.320.0040.01116.08
7.1.310.0030.01015.73
7.1.300.0140.00315.98
7.1.290.0030.01315.64
7.1.280.0030.00616.03
7.1.270.0100.00315.89
7.1.260.0040.00716.04
7.1.250.0070.01015.90
7.1.240.0040.01215.84
7.1.230.0060.00615.98
7.1.220.0090.00615.77
7.1.210.0050.00815.84
7.1.200.0050.01015.86
7.1.190.0100.00615.99
7.1.180.0070.00715.75
7.1.170.0030.01015.58
7.1.160.0100.00016.10
7.1.150.0100.00716.04
7.1.140.0040.00415.85
7.1.130.0130.00315.96
7.1.120.0030.00915.89
7.1.110.0120.00316.19
7.1.100.0000.01417.19
7.1.90.0060.00316.02
7.1.80.0030.01315.92
7.1.70.0070.00516.61
7.1.60.0100.00917.79
7.1.50.0090.00716.42
7.1.40.0030.00715.66
7.1.30.0050.00615.97
7.1.20.0030.01316.02
7.1.10.0140.00015.77
7.1.00.0040.04219.08
7.0.330.0030.01315.48
7.0.320.0090.00315.56
7.0.310.0030.01215.66
7.0.300.0040.01115.56
7.0.290.0110.00315.62
7.0.280.0060.01215.70
7.0.270.0040.01115.45
7.0.260.0030.00915.30
7.0.250.0090.00615.68
7.0.240.0000.00915.59
7.0.230.0040.01115.55
7.0.220.0040.00715.80
7.0.210.0090.00615.57
7.0.200.0050.00516.19
7.0.190.0090.00315.51
7.0.180.0000.00915.58
7.0.170.0100.00615.49
7.0.160.0000.01515.43
7.0.150.0090.00015.45
7.0.140.0020.04118.86
7.0.130.0050.00615.67
7.0.120.0070.00715.56
7.0.110.0040.01215.71
7.0.100.0030.01015.69
7.0.90.0040.01115.64
7.0.80.0070.01115.95
7.0.70.0030.04718.75
7.0.60.0050.04518.81
7.0.50.0030.03419.02
7.0.40.0030.04016.87
7.0.30.0000.03516.93
7.0.20.0050.04716.93
7.0.10.0140.03816.99
7.0.00.0020.05016.87
5.6.400.0090.00614.29
5.6.390.0040.00714.64
5.6.380.0040.01414.73
5.6.370.0060.00914.61
5.6.360.0000.01414.46
5.6.350.0030.01614.50
5.6.340.0060.00614.79
5.6.330.0100.00314.48
5.6.320.0070.00714.75
5.6.310.0000.01714.34
5.6.300.0040.00714.39
5.6.290.0060.01014.36
5.6.280.0060.03917.85
5.6.270.0080.00814.19
5.6.260.0030.01314.70
5.6.250.0070.01014.58
5.6.240.0040.00814.43
5.6.230.0000.01614.45
5.6.220.0030.03717.67
5.6.210.0080.03017.59
5.6.200.0050.04517.79
5.6.190.0100.04017.82
5.6.180.0050.05017.90
5.6.170.0030.04817.76
5.6.160.0070.04217.96
5.6.150.0030.04617.75
5.6.140.0080.02717.73
5.6.130.0060.04517.74
5.6.120.0020.04417.75
5.6.110.0050.04717.98
5.6.100.0050.04117.79
5.6.90.0110.03617.99
5.6.80.0030.03217.45
5.6.70.0020.04717.36
5.6.60.0030.03017.59
5.6.50.0050.03817.40
5.6.40.0100.03917.53
5.6.30.0030.04517.42
5.6.20.0030.02917.62
5.6.10.0070.03817.37
5.6.00.0070.04217.31
5.5.380.0110.00814.38
5.5.370.0060.00614.44
5.5.360.0080.02317.39
5.5.350.0100.04017.42
5.5.340.0050.04817.68
5.5.330.0050.03217.77
5.5.320.0080.04617.60
5.5.310.0070.03817.53
5.5.300.0050.04617.76
5.5.290.0000.04417.70
5.5.280.0060.04317.74
5.5.270.0050.04317.78
5.5.260.0030.04917.60
5.5.250.0150.03017.66
5.5.240.0090.03717.42
5.5.230.0070.04017.33
5.5.220.0060.03817.41
5.5.210.0080.03017.32
5.5.200.0030.03817.30
5.5.190.0020.04317.24
5.5.180.0100.03417.29
5.5.170.0080.00814.45
5.5.160.0060.04117.37
5.5.150.0040.04617.34
5.5.140.0100.04017.29
5.5.130.0100.03917.42
5.5.120.0130.03317.34
5.5.110.0020.04117.25
5.5.100.0050.04517.26
5.5.90.0030.03017.22
5.5.80.0070.03317.40
5.5.70.0080.03417.27
5.5.60.0080.04017.15
5.5.50.0060.03817.17
5.5.40.0070.04217.45
5.5.30.0080.04217.20
5.5.20.0110.04117.18
5.5.10.0050.04617.33
5.5.00.0070.02717.37
5.4.450.0030.04616.39
5.4.440.0050.03216.55
5.4.430.0060.03616.54
5.4.420.0080.03816.39
5.4.410.0010.04116.47
5.4.400.0080.03516.45
5.4.390.0080.04316.30
5.4.380.0020.03516.36
5.4.370.0070.03216.30
5.4.360.0060.02816.23
5.4.350.0040.03316.37
5.4.340.0050.04116.37
5.4.330.0000.01013.52
5.4.320.0050.04716.21
5.4.310.0050.04216.36
5.4.300.0070.03916.29
5.4.290.0030.04316.19
5.4.280.0020.03516.38
5.4.270.0050.04016.36
5.4.260.0080.04016.36
5.4.250.0040.03516.38
5.4.240.0060.02216.20
5.4.230.0060.04316.20
5.4.220.0030.04316.27
5.4.210.0030.04316.38
5.4.200.0030.03716.36
5.4.190.0070.04016.35
5.4.180.0030.04316.38
5.4.170.0050.04516.29
5.4.160.0060.03316.35
5.4.150.0050.04316.20
5.4.140.0070.03715.04
5.4.130.0070.03215.00
5.4.120.0060.04014.98
5.4.110.0040.04215.04
5.4.100.0030.03114.97
5.4.90.0060.03615.04
5.4.80.0020.03014.97
5.4.70.0030.04615.02
5.4.60.0040.03914.96
5.4.50.0020.04215.07
5.4.40.0080.03715.00
5.4.30.0080.03314.93
5.4.20.0070.03015.05
5.4.10.0020.03115.01
5.4.00.0100.03514.74
5.3.290.0050.03814.12
5.3.280.0030.04114.14
5.3.270.0040.03514.11
5.3.260.0050.03614.15
5.3.250.0020.04514.12
5.3.240.0030.03014.09
5.3.230.0040.04414.12
5.3.220.0050.03814.07
5.3.210.0020.04114.09
5.3.200.0090.03914.14
5.3.190.0050.04414.13
5.3.180.0050.03614.02
5.3.170.0010.04414.13
5.3.160.0030.03014.02
5.3.150.0020.03314.13
5.3.140.0130.03714.14
5.3.130.0020.04514.09
5.3.120.0020.04514.02
5.3.110.0080.04014.06
5.3.100.0030.03113.83
5.3.90.0030.03913.81
5.3.80.0050.04013.84
5.3.70.0030.03213.76
5.3.60.0070.03213.70
5.3.50.0020.03313.78
5.3.40.0090.02813.72
5.3.30.0050.03213.71
5.3.20.0030.04113.70
5.3.10.0070.03313.67
5.3.00.0030.03213.66
5.2.170.0000.07011.39
5.2.160.0000.05311.08
5.2.150.0030.06711.25
5.2.140.0000.07011.37
5.2.130.0000.06011.30
5.2.120.0000.07011.24
5.2.110.0030.05711.05
5.2.100.0030.04711.33
5.2.90.0030.04311.29
5.2.80.0030.06311.14
5.2.70.0030.06711.18
5.2.60.0070.04711.00
5.2.50.0000.06011.06
5.2.40.0070.04011.14
5.2.30.0070.06311.11
5.2.20.0100.05311.10
5.2.10.0130.05010.96
5.2.00.0100.05710.79
5.1.60.0030.04310.76
5.1.50.0000.06010.76
5.1.40.0030.05310.76
5.1.30.0000.05710.76
5.1.20.0000.06010.76
5.1.10.0000.05010.76
5.1.00.0000.05710.76
5.0.50.0000.05010.76
5.0.40.0030.04310.76
5.0.30.0000.06710.76
5.0.20.0030.03710.76
5.0.10.0030.04310.76
5.0.00.0070.05010.76
4.4.90.0000.02710.76
4.4.80.0000.03710.76
4.4.70.0070.02710.76
4.4.60.0030.03310.76
4.4.50.0070.03010.76
4.4.40.0030.04710.76
4.4.30.0030.03310.76
4.4.20.0000.04010.76
4.4.10.0070.03310.76
4.4.00.0000.04010.76
4.3.110.0000.04010.76
4.3.100.0030.03310.76
4.3.90.0000.02710.76
4.3.80.0030.05310.76
4.3.70.0030.02010.76
4.3.60.0000.03710.76
4.3.50.0070.03010.76
4.3.40.0030.05010.76
4.3.30.0000.04010.76
4.3.20.0000.03010.76
4.3.10.0000.03710.76
4.3.00.0030.03310.76

preferences:
46.66 ms | 401 KiB | 5 Q