3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting (E_ALL ^ E_NOTICE); ini_set('display_errors',true); $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <Whirlpool xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <PricingInfoResults> <RequestResults> <RequestDate>1/5/2017</RequestDate> <RequestTime>8:35 AM</RequestTime> <ReturnInfo> <ReturnInfoCode>1000</ReturnInfoCode> <ReturnInfoDesc>Promo code found</ReturnInfoDesc> </ReturnInfo> </RequestResults> <PricingInfo> <ProductDesc>Icemaker</ProductDesc> <CampaignCode>WRLPIO1612</CampaignCode> <CMICode>WR1612WEB</CMICode> <MCMCode>WHIRLPOOLWBOX</MCMCode> <RowId>1309467.00</RowId> <Term> <TermDesc>1 Year</TermDesc> <PaymentOption> <OptionDesc>Full Pay</OptionDesc> <Price>94.95</Price> <ProductIndicator>WD</ProductIndicator> </PaymentOption> </Term> <Term> <TermDesc>3 Year</TermDesc> <PaymentOption> <OptionDesc>Full Pay</OptionDesc> <Price>244.95</Price> <ProductIndicator>WE</ProductIndicator> </PaymentOption> </Term> </PricingInfo> </PricingInfoResults> </Whirlpool> XML; $simpleXML = simplexml_load_string($xml); $xpathText = '/Term/TermDesc'; $parent = (string)$simpleXML->PricingInfoResults->PricingInfo->Term->xpath($xpathText)[0]; echo '<pre>Parent';$parent;echo '</pre>'; ;

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.0090.00617.13
8.3.50.0120.00616.95
8.3.40.0090.00619.04
8.3.30.0090.00919.07
8.3.20.0000.00821.13
8.3.10.0040.00422.20
8.3.00.0050.00320.17
8.2.180.0100.01017.00
8.2.170.0150.00622.96
8.2.160.0070.01020.95
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00019.68
8.2.120.0080.00326.35
8.2.110.0070.00322.71
8.2.100.0030.00920.13
8.2.90.0080.00018.25
8.2.80.0000.00818.13
8.2.70.0040.00418.30
8.2.60.0030.00618.30
8.2.50.0050.00518.10
8.2.40.0030.00620.84
8.2.30.0040.00719.63
8.2.20.0050.00318.54
8.2.10.0080.00018.45
8.2.00.0000.00818.17
8.1.280.0060.01025.92
8.1.270.0040.00422.56
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.11
8.1.230.0090.00319.54
8.1.220.0040.00418.14
8.1.210.0050.00318.77
8.1.200.0060.00317.72
8.1.190.0030.00617.60
8.1.180.0060.00318.10
8.1.170.0080.00318.96
8.1.160.0000.00822.51
8.1.150.0050.00319.36
8.1.140.0040.00419.88
8.1.130.0000.00719.34
8.1.120.0050.00217.79
8.1.110.0040.00417.77
8.1.100.0000.00717.92
8.1.90.0050.00317.70
8.1.80.0000.00717.74
8.1.70.0040.00417.93
8.1.60.0060.00317.87
8.1.50.0030.00618.02
8.1.40.0000.00818.02
8.1.30.0060.00318.05
8.1.20.0000.00818.06
8.1.10.0030.00617.99
8.1.00.0000.00817.80
8.0.300.0000.00718.77
8.0.290.0050.00317.25
8.0.280.0070.00018.78
8.0.270.0000.00717.70
8.0.260.0030.00317.62
8.0.250.0040.00417.35
8.0.240.0000.00817.39
8.0.230.0000.00717.20
8.0.220.0000.00717.13
8.0.210.0000.01017.15
8.0.200.0000.00617.43
8.0.190.0080.00017.20
8.0.180.0030.00717.38
8.0.170.0080.00017.36
8.0.160.0030.00317.24
8.0.150.0040.00417.20
8.0.140.0070.00017.13
8.0.130.0030.00313.67
8.0.120.0000.00817.24
8.0.110.0040.00417.26
8.0.100.0040.00417.37
8.0.90.0040.00417.23
8.0.80.0090.00617.37
8.0.70.0040.00417.22
8.0.60.0000.00717.30
8.0.50.0030.00617.23
8.0.30.0100.01017.60
8.0.20.0090.01017.48
8.0.10.0080.00017.38
8.0.00.0100.00917.04
7.4.330.0000.00515.55
7.4.320.0060.00317.01
7.4.300.0000.00716.94
7.4.290.0050.00217.02
7.4.280.0000.00816.94
7.4.270.0030.00316.92
7.4.260.0000.00716.94
7.4.250.0080.00016.96
7.4.240.0030.00316.98
7.4.230.0030.00317.03
7.4.220.0030.01516.89
7.4.210.0070.00816.94
7.4.200.0030.00316.93
7.4.160.0150.00416.98
7.4.150.0130.01217.40
7.4.140.0120.00617.86
7.4.130.0030.01416.95
7.4.120.0110.01016.99
7.4.110.0190.00616.77
7.4.100.0170.00317.04
7.4.90.0100.00716.75
7.4.80.0070.01019.39
7.4.70.0070.01017.01
7.4.60.0070.01016.92
7.4.50.0040.01416.89
7.4.40.0030.01416.97
7.4.30.0150.00316.88
7.4.00.0030.01015.13
7.3.330.0000.00513.43
7.3.320.0030.00213.36
7.3.310.0000.00716.59
7.3.300.0050.00216.64
7.3.290.0030.00316.63
7.3.280.0100.01016.70
7.3.270.0060.01217.40
7.3.260.0130.00616.70
7.3.250.0120.00516.73
7.3.240.0110.01116.89
7.3.230.0090.01516.98
7.3.210.0060.01216.90
7.3.200.0070.01016.72
7.3.190.0090.01216.80
7.3.180.0150.00816.63
7.3.170.0060.00916.82
7.3.160.0160.00016.83
7.3.120.0110.00314.98
7.3.110.0070.01014.81
7.3.100.0030.01314.88
7.3.90.0070.01114.92
7.3.80.0030.01014.91
7.3.70.0100.00314.94
7.3.60.0070.00714.86
7.3.50.0110.00314.66
7.3.40.0100.00314.94
7.3.30.0000.01414.93
7.3.20.0000.01416.83
7.3.10.0090.00616.71
7.3.00.0040.00716.88
7.2.330.0040.01416.82
7.2.320.0040.01217.06
7.2.310.0130.00316.89
7.2.300.0090.01217.09
7.2.290.0150.00316.94
7.2.250.0100.01015.41
7.2.240.0110.00715.52
7.2.230.0030.01315.23
7.2.220.0050.00515.23
7.2.210.0040.01115.36
7.2.200.0070.00715.07
7.2.190.0140.00315.25
7.2.180.0030.01415.29
7.2.170.0030.01315.10
7.2.130.0040.00816.93
7.2.120.0040.01117.13
7.2.110.0050.00816.79
7.2.100.0040.00416.98
7.2.90.0100.00617.13
7.2.80.0110.00416.92
7.2.70.0070.00417.01
7.2.60.0090.00617.08
7.2.50.0090.00617.10
7.2.40.0000.01117.04
7.2.30.0000.01817.20
7.2.20.0000.01117.15
7.2.10.0030.01017.06
7.2.00.0060.00917.09
7.1.330.0040.01116.02
7.1.320.0070.00715.96
7.1.310.0030.00716.06
7.1.300.0030.01015.93
7.1.290.0000.01316.07
7.1.280.0070.00715.99
7.1.270.0060.01016.07
7.1.260.0060.00815.76
7.1.250.0060.00616.20
7.1.200.0040.00715.75
7.1.70.0040.00717.43
7.1.60.0030.00717.30
7.1.00.0200.05322.80
7.0.200.0030.01417.02
7.0.140.0070.06322.20
7.0.130.0100.07722.16
7.0.120.0200.06322.38
7.0.110.0130.05720.35
7.0.100.0070.06722.13
7.0.90.0230.07020.39
7.0.80.0170.07720.45
7.0.70.0130.07322.31
7.0.60.1370.06020.41
7.0.50.0230.06720.53
7.0.40.1730.06020.37
7.0.30.0130.05022.31
7.0.20.0100.05320.39
7.0.10.1100.07320.39
7.0.00.1270.06320.50
5.6.290.0230.05721.02
5.6.280.0170.05321.28
5.6.270.0130.05321.24
5.6.260.0100.05720.96
5.6.250.0100.06021.10
5.6.240.0100.09021.14
5.6.230.0130.06021.29
5.6.220.0100.07021.14
5.6.210.0200.04721.06
5.6.200.0000.06721.07
5.6.190.0170.05720.92
5.6.180.0070.05721.08
5.6.170.0200.04320.92
5.6.160.0070.05721.01
5.6.150.0070.06321.20
5.6.140.0070.06021.19
5.6.130.0000.08021.04
5.6.120.0130.06020.91
5.6.110.0130.06021.33
5.6.100.0130.05721.22
5.6.90.0100.06021.04
5.6.80.0100.05320.47
5.6.70.0070.05720.43
5.6.60.0170.06020.42
5.6.50.0070.07320.61
5.6.40.0100.05720.59
5.6.30.0130.05320.45
5.6.20.0070.07320.54
5.6.10.0170.04320.55
5.6.00.0070.06320.34

preferences:
61.11 ms | 400 KiB | 5 Q