3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8"?> <book> <section> <p>Example text</p> <p>Another text</p> <img l:href="imagehref"> <p>Textual content</p> </section> </book>'; $xml = simplexml_load_string($xml); foreach($xml->xpath('/section') as $section) { echo 'Got section', "\n"; foreach($section->children() as $node) { echo $node->getName(), "\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.0040.01116.73
8.3.50.0070.01016.51
8.3.40.0080.00819.13
8.3.30.0150.00019.19
8.3.20.0000.00820.84
8.3.10.0080.00023.76
8.3.00.0040.00421.98
8.2.180.0060.00918.86
8.2.170.0070.00722.96
8.2.160.0100.00320.72
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0030.00521.34
8.2.120.0000.00826.35
8.2.110.0030.00621.25
8.2.100.0040.00818.05
8.2.90.0000.00919.48
8.2.80.0030.00518.00
8.2.70.0060.00317.50
8.2.60.0040.00418.05
8.2.50.0000.00818.09
8.2.40.0000.00720.89
8.2.30.0000.00719.67
8.2.20.0000.00717.97
8.2.10.0040.00418.21
8.2.00.0000.00718.36
8.1.280.0040.01125.92
8.1.270.0100.01022.29
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0070.00420.93
8.1.230.0070.00318.02
8.1.220.0030.00517.79
8.1.210.0030.00518.77
8.1.200.0070.00317.59
8.1.190.0000.00817.48
8.1.180.0110.00018.10
8.1.170.0030.00618.64
8.1.160.0030.00520.89
8.1.150.0080.00020.96
8.1.140.0050.00319.70
8.1.130.0050.00217.87
8.1.120.0050.00317.55
8.1.110.0040.00417.50
8.1.100.0000.00817.57
8.1.90.0000.00817.61
8.1.80.0060.00317.66
8.1.70.0000.00717.75
8.1.60.0030.00617.59
8.1.50.0040.00517.81
8.1.40.0000.00817.87
8.1.30.0000.00818.02
8.1.20.0040.00717.84
8.1.10.0050.00317.72
8.1.00.0000.00717.80
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0040.00418.68
8.0.270.0040.00417.37
8.0.260.0030.00317.39
8.0.250.0000.00817.21
8.0.240.0000.00817.34
8.0.230.0070.00017.21
8.0.220.0000.00817.18
8.0.210.0070.00017.07
8.0.200.0030.00317.27
8.0.190.0000.00817.05
8.0.180.0080.00017.16
8.0.170.0000.00817.08
8.0.160.0000.00717.11
8.0.150.0000.00817.12
8.0.140.0050.00217.16
8.0.130.0050.00013.55
8.0.120.0000.00817.12
8.0.110.0080.00017.25
8.0.100.0000.00717.11
8.0.90.0000.00716.92
8.0.80.0130.00317.12
8.0.70.0070.00017.07
8.0.60.0040.00416.92
8.0.50.0000.00817.08
8.0.30.0040.01217.35
8.0.20.0110.00917.50
8.0.10.0040.00417.41
8.0.00.0100.01017.04
7.4.330.0020.00217.18
7.4.320.0030.00316.75
7.4.300.0000.00716.71
7.4.290.0070.00016.85
7.4.280.0050.00216.64
7.4.270.0030.00316.65
7.4.260.0030.00316.63
7.4.250.0040.00416.71
7.4.240.0040.00416.88
7.4.230.0070.00016.67
7.4.220.0040.01416.79
7.4.210.0080.00816.78
7.4.200.0030.00316.52
7.4.160.0120.00416.76
7.4.150.0120.00617.40
7.4.140.0100.01217.86
7.4.130.0070.00916.69
7.4.120.0130.00516.70
7.4.110.0140.00316.79
7.4.100.0120.00616.82
7.4.90.0060.01116.70
7.4.80.0060.01219.39
7.4.70.0030.01316.88
7.4.60.0060.01016.70
7.4.50.0000.01816.85
7.4.40.0060.01116.74
7.4.30.0090.00916.78
7.4.00.0060.01015.03
7.3.330.0030.00313.48
7.3.320.0000.00813.47
7.3.310.0020.00516.57
7.3.300.0050.00216.51
7.3.290.0030.00316.47
7.3.280.0100.01016.51
7.3.270.0100.00717.40
7.3.260.0060.01116.50
7.3.250.0120.00816.54
7.3.240.0140.00416.51
7.3.230.0130.00316.76
7.3.210.0160.00016.53
7.3.200.0030.01619.39
7.3.190.0070.01116.55
7.3.180.0130.00316.79
7.3.170.0090.00916.76
7.3.160.0110.00616.59
7.3.120.0050.01214.94
7.3.110.0070.00914.86
7.3.100.0050.00914.81
7.3.90.0040.00714.71
7.3.80.0060.00815.01
7.3.70.0070.00614.86
7.3.60.0020.01314.72
7.3.50.0030.01014.86
7.3.40.0050.01214.82
7.3.30.0050.00714.68
7.3.20.0070.00816.72
7.3.10.0060.00716.64
7.3.00.0060.00616.58
7.2.330.0030.01316.65
7.2.320.0090.01916.62
7.2.310.0060.01316.77
7.2.300.0100.00716.82
7.2.290.0060.01016.76
7.2.250.0110.00315.35
7.2.240.0060.01015.05
7.2.230.0100.00515.04
7.2.220.0050.00714.99
7.2.210.0060.00715.05
7.2.200.0070.01115.16
7.2.190.0080.00514.96
7.2.180.0040.00915.02
7.2.170.0100.00515.07
7.2.160.0000.01415.19
7.2.150.0070.00716.86
7.2.140.0040.01116.87
7.2.130.0050.00516.88
7.2.120.0120.00016.63
7.2.110.0110.00716.73
7.2.100.0000.01716.83
7.2.90.0080.00816.82
7.2.80.0100.00316.85
7.2.70.0060.00916.88
7.2.60.0060.00716.92
7.2.50.0140.00416.84
7.2.40.0000.01316.95
7.2.30.0030.01116.91
7.2.20.0080.00316.64
7.2.10.0060.01016.67
7.2.00.0050.01118.31
7.1.330.0040.01015.56
7.1.320.0050.00715.92
7.1.310.0100.00515.77
7.1.300.0050.00915.58
7.1.290.0030.01015.71
7.1.280.0050.01015.78
7.1.270.0070.00515.76
7.1.260.0030.01115.91
7.1.250.0030.01015.67
7.1.200.0060.00615.80
7.1.100.0030.00718.35
7.1.70.0000.01417.33
7.1.60.0070.01719.40
7.1.50.0070.01416.98
7.1.00.0030.08022.58
7.0.200.0140.00814.93
7.0.60.0270.07321.85
7.0.50.0030.04718.04
7.0.40.0100.08320.38
7.0.30.0170.04720.25
7.0.20.0330.07320.32
7.0.10.0130.08320.25
7.0.00.0070.08720.29
5.6.280.0000.04321.05
5.6.210.0030.08720.68
5.6.200.0030.08018.25
5.6.190.0130.06020.49
5.6.180.0230.07320.57
5.6.170.0170.03720.58
5.6.160.0030.04020.68
5.6.150.0070.08718.31
5.6.140.0100.07718.26
5.6.130.0070.04018.29
5.6.120.0130.05021.01
5.6.110.0030.08021.17
5.6.100.0000.04320.99
5.6.90.0170.07021.02
5.6.80.0000.07020.61
5.5.350.0270.07720.53
5.5.340.0070.04717.99
5.5.330.0070.08720.29
5.5.320.0200.08020.54
5.5.310.0230.08020.32
5.5.300.0070.06318.02
5.5.290.0100.08018.18
5.5.280.0030.08720.88
5.5.270.0000.04320.91
5.5.260.0000.07720.91
5.5.250.0070.06720.59
5.5.240.0300.06720.39

preferences:
61.31 ms | 400 KiB | 5 Q