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 . "\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.0100.01016.88
8.3.50.0090.00922.23
8.3.40.0120.00318.96
8.3.30.0060.00919.28
8.3.20.0040.00420.59
8.3.10.0070.00023.90
8.3.00.0000.00821.02
8.2.180.0150.00017.13
8.2.170.0110.00422.96
8.2.160.0100.00320.78
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0030.00521.28
8.2.110.0060.00322.63
8.2.100.0090.00322.64
8.2.90.0040.00419.55
8.2.80.0000.00817.97
8.2.70.0060.00317.88
8.2.60.0080.00018.18
8.2.50.0050.00318.07
8.2.40.0050.00318.47
8.2.30.0060.00318.59
8.2.20.0030.00518.02
8.2.10.0000.00718.37
8.2.00.0040.00417.92
8.1.280.0070.00725.92
8.1.270.0040.00424.29
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0090.00023.95
8.1.230.0000.01219.36
8.1.220.0050.00318.02
8.1.210.0040.00418.77
8.1.200.0040.00817.60
8.1.190.0060.00317.60
8.1.180.0040.00418.10
8.1.170.0000.00818.90
8.1.160.0080.00022.32
8.1.150.0040.00418.97
8.1.140.0000.00717.69
8.1.130.0070.00018.04
8.1.120.0030.00517.80
8.1.110.0090.00017.64
8.1.100.0000.00817.64
8.1.90.0040.00417.78
8.1.80.0000.00717.83
8.1.70.0000.00717.81
8.1.60.0000.00917.93
8.1.50.0030.00517.66
8.1.40.0080.00017.85
8.1.30.0060.00317.95
8.1.20.0030.00618.00
8.1.10.0000.00817.89
8.1.00.0030.00617.79
8.0.300.0020.00518.77
8.0.290.0070.00016.88
8.0.280.0000.00718.71
8.0.270.0000.00717.56
8.0.260.0000.00817.40
8.0.250.0070.00017.10
8.0.240.0070.00017.23
8.0.230.0050.00217.11
8.0.220.0030.00317.23
8.0.210.0040.00417.06
8.0.200.0000.00617.11
8.0.190.0060.00317.12
8.0.180.0000.00717.24
8.0.170.0030.00617.23
8.0.160.0000.00717.24
8.0.150.0060.00317.16
8.0.140.0020.00516.98
8.0.130.0060.00013.54
8.0.120.0080.00017.01
8.0.110.0000.00817.03
8.0.100.0040.00417.03
8.0.90.0000.00716.98
8.0.80.0090.00617.20
8.0.70.0080.00016.90
8.0.60.0000.00817.21
8.0.50.0040.00417.13
8.0.30.0100.01217.22
8.0.20.0120.01117.40
8.0.10.0030.00517.27
8.0.00.0140.00516.87
7.4.330.0050.00015.31
7.4.320.0000.00716.85
7.4.300.0030.00316.96
7.4.290.0000.00716.77
7.4.280.0060.00316.84
7.4.270.0040.00416.75
7.4.260.0000.00716.81
7.4.250.0050.00316.75
7.4.240.0040.00416.66
7.4.230.0040.00416.65
7.4.220.0120.00616.85
7.4.210.0090.00616.93
7.4.200.0030.00316.65
7.4.160.0180.00616.69
7.4.150.0130.00417.40
7.4.140.0090.01117.86
7.4.130.0070.01116.75
7.4.120.0080.01016.66
7.4.110.0140.00716.62
7.4.100.0080.01116.60
7.4.90.0150.00916.67
7.4.80.0090.01319.39
7.4.70.0090.00916.82
7.4.60.0130.00316.79
7.4.50.0000.00816.62
7.4.40.0100.00716.78
7.4.30.0040.01416.81
7.4.10.0040.01515.15
7.4.00.0070.00815.12
7.3.330.0060.00013.39
7.3.320.0060.00013.39
7.3.310.0000.00716.68
7.3.300.0000.00716.60
7.3.290.0090.00616.59
7.3.280.0080.01016.67
7.3.270.0130.00917.40
7.3.260.0110.00716.49
7.3.250.0130.00916.68
7.3.240.0120.00616.69
7.3.230.0090.01016.59
7.3.210.0060.01316.61
7.3.200.0000.01719.39
7.3.190.0140.00416.65
7.3.180.0100.00716.43
7.3.170.0090.00916.72
7.3.160.0110.00516.48
7.3.130.0100.00714.75
7.3.120.0060.01015.11
7.3.110.0100.00715.00
7.3.100.0090.00315.00
7.3.90.0070.00714.92
7.3.80.0000.01115.05
7.3.70.0060.00914.90
7.3.60.0070.00715.04
7.3.50.0060.00615.06
7.3.40.0030.00914.90
7.3.30.0040.01215.24
7.3.20.0100.00316.93
7.3.10.0100.00416.69
7.3.00.0050.00916.87
7.2.330.0030.01616.99
7.2.320.0040.01417.04
7.2.310.0140.00916.85
7.2.300.0100.00716.97
7.2.290.0150.00316.81
7.2.260.0110.00715.34
7.2.250.0090.00915.17
7.2.240.0100.00315.43
7.2.230.0070.00315.43
7.2.220.0040.01115.48
7.2.210.0090.00615.50
7.2.200.0040.00815.31
7.2.190.0070.01015.16
7.2.180.0030.01315.11
7.2.170.0090.00615.33
7.2.160.0060.01215.20
7.2.150.0070.00717.16
7.2.140.0100.00717.08
7.2.130.0040.01117.09
7.2.120.0010.01017.07
7.2.110.0050.01016.87
7.2.100.0030.01017.06
7.2.90.0030.01017.01
7.2.80.0090.00517.26
7.2.70.0060.00917.16
7.2.60.0000.01317.13
7.2.50.0050.01117.16
7.2.40.0100.00617.29
7.2.30.0030.00917.19
7.2.20.0070.00617.18
7.2.10.0080.00617.06
7.2.00.0060.00617.09
7.1.330.0000.01315.69
7.1.320.0140.00316.17
7.1.310.0070.00716.12
7.1.300.0100.00616.13
7.1.290.0120.00015.81
7.1.280.0030.00515.75
7.1.270.0060.00615.94
7.1.260.0100.00316.09
7.1.250.0050.01016.13
7.1.240.0060.00915.96
7.1.230.0040.01416.09
7.1.220.0140.00316.13
7.1.210.0030.01015.75
7.1.200.0040.01115.89
7.1.190.0060.01015.66
7.1.180.0090.00316.08
7.1.170.0100.00715.91
7.1.160.0060.01016.07
7.1.150.0030.01015.71
7.1.140.0000.01216.07
7.1.130.0060.00615.89
7.1.120.0000.01316.05
7.1.110.0100.00316.04
7.1.100.0050.01117.15
7.1.90.0070.00715.90
7.1.80.0040.01115.88
7.1.70.0050.00816.61
7.1.60.0130.00817.85
7.1.50.0060.00916.42
7.1.40.0090.00916.08
7.1.30.0070.01115.88
7.1.20.0070.01015.86
7.1.10.0070.00715.88
7.1.00.0060.04019.26
7.0.330.0090.00015.30
7.0.320.0030.01015.52
7.0.310.0030.01315.47
7.0.300.0110.00315.45
7.0.290.0060.00615.40
7.0.280.0070.00315.44
7.0.270.0060.00315.56
7.0.260.0070.00315.54
7.0.250.0060.00615.64
7.0.240.0070.00315.49
7.0.230.0070.00715.67
7.0.220.0070.00315.55
7.0.210.0080.00415.64
7.0.200.0070.00316.23
7.0.190.0070.00715.43
7.0.180.0070.01115.68
7.0.170.0140.00315.74
7.0.160.0000.01015.43
7.0.150.0040.01115.54
7.0.140.0050.04018.83
7.0.130.0040.00815.64
7.0.120.0040.01115.55
7.0.110.0120.00315.61
7.0.100.0060.02517.83
7.0.90.0030.04817.91
7.0.80.0240.03817.88
7.0.70.0070.04617.83
7.0.60.0150.04517.91
7.0.50.0070.03218.05
7.0.40.0050.04516.89
7.0.30.0050.02716.81
7.0.20.0070.02316.91
7.0.10.0100.02016.94
7.0.00.0110.02016.95
5.6.400.0060.00914.47
5.6.390.0100.00314.79
5.6.380.0000.01614.34
5.6.370.0110.00014.82
5.6.360.0060.00614.08
5.6.350.0000.01514.15
5.6.340.0060.00614.46
5.6.330.0040.01214.71
5.6.320.0000.01614.26
5.6.310.0040.00414.80
5.6.300.0070.00714.37
5.6.290.0060.00914.69
5.6.280.0060.04717.85
5.6.270.0110.00414.27
5.6.260.0040.01114.52
5.6.250.0030.03017.60
5.6.240.0040.02417.83
5.6.230.0050.04817.54
5.6.220.0140.03717.62
5.6.210.0080.02717.60
5.6.200.0100.02417.78
5.6.190.0000.03517.84
5.6.180.0030.04017.78
5.6.170.0050.02617.62
5.6.160.0060.02417.99
5.6.150.0070.02017.71
5.6.140.0080.01817.87
5.6.130.0020.02917.83
5.6.120.0090.01817.69
5.6.110.0060.02117.72
5.6.100.0020.04017.79
5.6.90.0050.04617.71
5.6.80.0060.03817.46
5.6.70.0050.02417.37
5.6.60.0130.02517.40
5.6.50.0100.03517.36
5.6.40.0050.03017.43
5.6.30.0020.02617.48
5.6.20.0040.02417.58
5.6.10.0020.03617.39
5.6.00.0080.01917.59
5.5.380.0100.02317.44
5.5.370.0050.04617.54
5.5.360.0080.04317.46
5.5.350.0070.04217.50
5.5.340.0080.03617.78
5.5.330.0100.04017.59
5.5.320.0030.02917.55
5.5.310.0060.02817.58
5.5.300.0030.02817.49
5.5.290.0060.02117.60
5.5.280.0030.02917.58
5.5.270.0080.04317.69
5.5.260.0090.02117.81
5.5.250.0050.02717.40
5.5.240.0040.02617.38
5.5.230.0040.02417.16
5.5.220.0030.02517.36
5.5.210.0080.04517.21
5.5.200.0070.04017.39
5.5.190.0070.02317.34
5.5.180.0110.02317.32
5.5.170.0120.00914.37
5.5.160.0060.02517.31
5.5.150.0050.03017.42
5.5.140.0060.02317.11
5.5.130.0050.02417.19
5.5.120.0050.02817.33
5.5.110.0080.02117.22
5.5.100.0080.02217.30
5.5.90.0050.02317.32
5.5.80.0080.02317.31
5.5.70.0000.03717.31
5.5.60.0050.02217.28
5.5.50.0030.02317.15
5.5.40.0030.02317.36
5.5.30.0050.02017.16
5.5.20.0080.02017.24
5.5.10.0080.02917.01
5.5.00.0120.01817.12
5.4.450.0030.02415.24
5.4.440.0030.02215.11
5.4.430.0100.03314.94
5.4.420.0090.04015.16
5.4.410.0050.01715.25
5.4.400.0050.02214.98
5.4.390.0020.02914.99
5.4.380.0120.03714.93
5.4.370.0120.02815.00
5.4.360.0030.02314.88
5.4.350.0050.03315.02
5.4.340.0080.02614.88
5.4.330.0070.00610.70
5.4.320.0070.03315.21
5.4.310.0050.03314.91
5.4.300.0090.01914.84
5.4.290.0030.02114.92
5.4.280.0050.02214.99
5.4.270.0030.02315.08
5.4.260.0080.02014.79
5.4.250.0070.02214.95
5.4.240.0040.02015.13
5.4.230.0050.02814.76
5.4.220.0040.02415.01
5.4.210.0050.02115.02
5.4.200.0050.02215.02
5.4.190.0060.02115.03
5.4.180.0040.02214.97
5.4.170.0020.02215.16
5.4.160.0050.02514.87
5.4.150.0050.02315.00
5.4.140.0030.02713.77
5.4.130.0040.02113.65
5.4.120.0050.02713.66
5.4.110.0060.04113.59
5.4.100.0110.03313.73
5.4.90.0070.03713.54
5.4.80.0090.02913.80
5.4.70.0080.01813.61
5.4.60.0050.03213.68
5.4.50.0090.03613.54
5.4.40.0050.04213.65
5.4.30.0110.03513.71
5.4.20.0080.02313.78
5.4.10.0090.03813.71
5.4.00.0110.03313.32
5.3.290.0090.02112.81
5.3.280.0060.02412.68
5.3.270.0060.02412.71
5.3.260.0110.01512.64
5.3.250.0050.02312.68
5.3.240.0040.02912.52
5.3.230.0070.02612.67
5.3.220.0090.03012.59
5.3.210.0090.04512.54
5.3.200.0060.02412.57
5.3.190.0060.04812.67
5.3.180.0130.02712.62
5.3.170.0130.04012.74
5.3.160.0080.04012.65
5.3.150.0130.03612.65
5.3.140.0050.03212.46
5.3.130.0050.03512.61
5.3.120.0090.04012.63
5.3.110.0050.04312.45
5.3.100.0060.02812.35
5.3.90.0070.03712.38
5.3.80.0070.03112.28
5.3.70.0090.03612.25
5.3.60.0030.04112.35
5.3.50.0080.03112.18
5.3.40.0040.02912.30
5.3.30.0090.03012.30
5.3.20.0140.03612.16
5.3.10.0100.03212.02
5.3.00.0110.03611.95
5.2.170.0030.06711.19
5.2.160.0100.03711.30
5.2.150.0030.04711.33
5.2.140.0000.04711.25
5.2.130.0100.05311.24
5.2.120.0000.06311.28
5.2.110.0030.06711.21
5.2.100.0000.04011.34
5.2.90.0030.05311.14
5.2.80.0030.03011.14
5.2.70.0100.05011.07
5.2.60.0130.05011.16
5.2.50.0070.06310.99
5.2.40.0000.05711.08
5.2.30.0030.05711.08
5.2.20.0000.05311.15
5.2.10.0000.04310.88
5.2.00.0030.03710.96
5.1.60.0030.05010.00
5.1.50.0100.03710.19
5.1.40.0100.04310.08
5.1.30.0030.02710.52
5.1.20.0030.03010.52
5.1.10.0070.02010.05
5.1.00.0030.05010.28
5.0.50.0030.0508.78
5.0.40.0030.0438.63
5.0.30.0030.0638.39
5.0.20.0070.0338.39
5.0.10.0030.0478.37
5.0.00.0070.0578.18
4.4.90.0070.0338.09
4.4.80.0000.0408.09
4.4.70.0000.0408.09
4.4.60.0000.0308.09
4.4.50.0000.0238.09
4.4.40.0100.0478.09
4.4.30.0030.0208.09
4.4.20.0000.0178.09
4.4.10.0030.0178.09
4.4.00.0030.0378.09
4.3.110.0030.0338.09
4.3.100.0030.0378.09
4.3.90.0000.0378.09
4.3.80.0000.0608.09
4.3.70.0070.0308.09
4.3.60.0000.0208.09
4.3.50.0100.0238.09
4.3.40.0070.0478.09
4.3.30.0000.0308.09
4.3.20.0030.0338.09
4.3.10.0030.0378.09
4.3.00.0000.0378.09

preferences:
51.23 ms | 401 KiB | 5 Q