3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <book xmlns:chap="http://example.org/chapter-title"> <title>My Book</title> <chapter id="1"> <chap:title>Chapter 1</chap:title> <para>Donec velit. Nullam eget tellus vitae tortor gravida scelerisque. In orci lorem, cursus imperdiet, ultricies non, hendrerit et, orci. Nulla facilisi. Nullam velit nisl, laoreet id, condimentum ut, ultricies id, mauris.</para> </chapter> <chapter id="2"> <chap:title>Chapter 2</chap:title> <para>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin gravida. Phasellus tincidunt massa vel urna. Proin adipiscing quam vitae odio. Sed dictum. Ut tincidunt lorem ac lorem. Duis eros tellus, pharetra id, faucibus eu, dapibus dictum, odio.</para> </chapter> </book> EOD; $sxe = new SimpleXMLElement($xml); $sxe->registerXPathNamespace('c', 'http://example.org/chapter-title'); $result = $sxe->xpath('//c:title'); foreach ($result as $title) { echo $title . "\n"; }

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.0120.00618.68
8.3.50.0110.00822.17
8.3.40.0150.00019.00
8.3.30.0070.00719.17
8.3.20.0110.00420.77
8.3.10.0030.00620.96
8.3.00.0020.00522.18
8.2.180.0090.00616.63
8.2.170.0150.00022.96
8.2.160.0150.00022.60
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0150.00326.16
8.2.120.0060.00321.14
8.2.110.0070.00319.64
8.2.100.0040.00818.18
8.2.90.0000.00819.59
8.2.80.0060.00317.97
8.2.70.0060.00317.88
8.2.60.0000.00818.41
8.2.50.0080.00018.30
8.2.40.0080.00020.97
8.2.30.0040.00419.89
8.2.20.0070.00018.20
8.2.10.0030.00618.50
8.2.00.0000.00818.66
8.1.280.0070.01425.92
8.1.270.0070.01122.43
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.67
8.1.230.0040.00818.14
8.1.220.0080.00018.16
8.1.210.0040.00418.77
8.1.200.0070.00317.72
8.1.190.0080.00017.50
8.1.180.0050.00318.10
8.1.170.0040.00719.09
8.1.160.0020.00521.10
8.1.150.0040.00419.20
8.1.140.0000.00819.91
8.1.130.0020.00518.05
8.1.120.0040.00417.90
8.1.110.0040.00417.92
8.1.100.0030.00617.89
8.1.90.0030.00517.66
8.1.80.0080.00017.79
8.1.70.0000.00717.71
8.1.60.0080.00318.02
8.1.50.0030.00617.99
8.1.40.0000.00817.91
8.1.30.0000.00818.10
8.1.20.0000.00717.93
8.1.10.0000.00717.81
8.1.00.0000.00817.81
8.0.300.0000.00818.77
8.0.290.0000.00817.13
8.0.280.0070.00018.79
8.0.270.0030.00317.63
8.0.260.0000.00717.59
8.0.250.0030.00317.21
8.0.240.0000.00817.50
8.0.230.0030.00317.48
8.0.220.0050.00317.35
8.0.210.0040.00417.30
8.0.200.0030.00317.45
8.0.190.0040.00417.45
8.0.180.0080.00017.26
8.0.170.0000.00817.22
8.0.160.0000.00717.40
8.0.150.0000.00817.36
8.0.140.0050.00317.14
8.0.130.0030.00313.86
8.0.120.0040.00417.36
8.0.110.0070.00017.31
8.0.100.0050.00217.07
8.0.90.0000.00717.30
8.0.80.0090.00617.27
8.0.70.0040.00417.13
8.0.60.0050.00317.45
8.0.50.0040.00417.18
8.0.30.0070.01017.59
8.0.20.0120.00617.45
8.0.10.0040.00417.59
8.0.00.0080.00917.23
7.4.330.0060.00017.21
7.4.320.0000.00816.85
7.4.300.0000.00617.05
7.4.290.0040.00416.83
7.4.280.0040.00416.89
7.4.270.0030.00316.89
7.4.260.0040.00716.98
7.4.250.0080.00016.75
7.4.240.0070.00016.97
7.4.230.0000.00717.09
7.4.220.0110.00716.81
7.4.210.0030.01217.02
7.4.200.0030.00316.75
7.4.160.0140.00516.97
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0050.01216.78
7.4.120.0080.00916.89
7.4.110.0060.01716.90
7.4.100.0140.00316.87
7.4.90.0120.00616.64
7.4.80.0090.01219.39
7.4.70.0030.01316.92
7.4.60.0120.00916.79
7.4.50.0070.00716.95
7.4.40.0090.00916.81
7.4.30.0170.00017.10
7.4.00.0050.01015.10
7.3.330.0050.00013.63
7.3.320.0050.00013.54
7.3.310.0000.00816.82
7.3.300.0000.00716.64
7.3.290.0000.00816.64
7.3.280.0100.00916.70
7.3.270.0060.01017.40
7.3.260.0130.01316.57
7.3.250.0110.00616.88
7.3.240.0080.00816.74
7.3.230.0070.01016.75
7.3.210.0130.01016.96
7.3.200.0070.01016.95
7.3.190.0000.01716.67
7.3.180.0030.01316.84
7.3.170.0160.00716.64
7.3.160.0080.00816.65
7.3.120.0030.01515.01
7.3.110.0030.01014.94
7.3.100.0060.01014.98
7.3.90.0050.00615.26
7.3.80.0000.01215.01
7.3.70.0060.01015.11
7.3.60.0150.00015.05
7.3.50.0000.01314.89
7.3.40.0130.00314.97
7.3.30.0140.00015.02
7.3.20.0120.00016.86
7.3.10.0000.01316.82
7.3.00.0060.00916.90
7.2.330.0090.00917.05
7.2.320.0120.01216.99
7.2.310.0170.00016.87
7.2.300.0120.00617.21
7.2.290.0030.01317.05
7.2.250.0060.01315.05
7.2.240.0070.01015.29
7.2.230.0120.00315.46
7.2.220.0050.00515.05
7.2.210.0060.00615.09
7.2.200.0090.00615.36
7.2.190.0030.00915.12
7.2.180.0070.00415.30
7.2.170.0090.00615.17
7.2.00.0100.01019.48
7.1.330.0070.00716.04
7.1.320.0040.00715.90
7.1.310.0070.01015.77
7.1.300.0060.00615.87
7.1.290.0070.00315.83
7.1.280.0090.00615.86
7.1.270.0060.00615.91
7.1.260.0080.00415.92
7.1.100.0030.01318.44
7.1.70.0000.00717.01
7.1.60.0060.00919.27
7.1.50.0030.01717.08
7.1.00.0070.07322.59
7.0.200.0390.00714.70
7.0.60.0230.03320.24
7.0.50.0100.05018.04
7.0.40.0070.07720.55
7.0.30.0100.04720.41
7.0.20.0130.04320.45
7.0.10.0100.07320.21
7.0.00.0200.07720.29
5.6.280.0030.03321.12
5.6.210.0070.07320.68
5.6.200.0070.05318.39
5.6.190.0070.07020.59
5.6.180.0200.04720.71
5.6.170.0130.05020.71
5.6.160.0100.07020.64
5.6.150.0100.03318.36
5.6.140.0000.05018.31
5.6.130.0170.02718.36
5.6.120.0070.08721.11
5.6.110.0070.04021.16
5.6.100.0100.08021.29
5.6.90.0030.09021.13
5.6.80.0100.08320.63
5.5.350.0370.07020.64
5.5.340.0000.04318.09
5.5.330.0070.04020.41
5.5.320.0470.07020.44
5.5.310.0300.04320.38
5.5.300.0070.06318.19
5.5.290.0030.07018.13
5.5.280.0170.06320.92
5.5.270.0030.09020.89
5.5.260.0070.05321.04
5.5.250.0070.08020.74
5.5.240.0000.05020.40

preferences:
52.28 ms | 401 KiB | 5 Q