3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div> <p>Paragraph one is okay </p> <h2>This will work without problem</h2> <p>Paragraph two is okay </p> <h2>This heading too</h2> <p>Paragraph one is okay </p> <h2>This item list will work too</h2> <p>Paragraph two is okay </p> <h3>1. <a href="https://www.example1.com/">This wont work</a></h3> <p>Paragraph one is okay </p> <h3>2. <a href="https://www.example2.com/">Not working</a></h3> <p>Paragraph two is okay </p> <h3>3. Neither this one</h3> <h3>But this works again</h3> </div> HTML; $dom = new DOMDocument; $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach ($xpath->query("//h2 | //h3") as $node) { echo var_export($node->nodeValue, true) . "\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.01117.00
8.3.50.0120.00318.37
8.3.40.0070.01019.43
8.3.30.0120.00419.08
8.3.20.0050.00324.18
8.3.10.0000.00824.66
8.3.00.0110.00426.16
8.2.180.0130.00325.92
8.2.170.0090.00619.31
8.2.160.0140.00022.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00421.50
8.2.110.0100.00021.50
8.2.100.0100.00720.44
8.2.90.0050.00318.16
8.2.80.0000.00818.00
8.2.70.0040.00418.00
8.2.60.0000.00818.41
8.2.50.0100.00018.07
8.2.40.0040.00420.45
8.2.30.0040.00418.35
8.2.20.0070.00318.46
8.2.10.0060.00319.72
8.2.00.0050.00219.79
8.1.280.0120.00625.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00621.27
8.1.230.0090.00321.23
8.1.220.0000.00918.03
8.1.210.0040.00418.89
8.1.200.0100.00017.60
8.1.190.0030.00517.47
8.1.180.0050.00318.10
8.1.170.0030.00618.84
8.1.160.0040.00419.29
8.1.150.0050.00219.23
8.1.140.0050.00321.08
8.1.130.0000.00720.52
8.1.120.0000.00817.88
8.1.110.0030.00517.80
8.1.100.0000.00717.79
8.1.90.0040.00417.79
8.1.80.0060.00317.91
8.1.70.0070.00317.76
8.1.60.0040.00417.97
8.1.50.0030.00617.88
8.1.40.0030.00517.91
8.1.30.0040.00418.07
8.1.20.0030.00517.95
8.1.10.0040.00417.97
8.1.00.0030.00617.91
8.0.300.0080.00020.27
8.0.290.0070.00017.13
8.0.280.0040.00418.89
8.0.270.0050.00218.43
8.0.260.0030.00320.62
8.0.250.0030.00317.33
8.0.240.0000.00817.41
8.0.230.0040.00417.42
8.0.220.0030.00317.33
8.0.210.0040.00417.23
8.0.200.0030.00317.31
8.0.190.0000.00817.25
8.0.180.0050.00317.41
8.0.170.0030.00617.25
8.0.160.0040.00417.30
8.0.150.0030.00517.27
8.0.140.0050.00317.29
8.0.130.0030.00313.81
8.0.120.0050.00317.34
8.0.110.0040.00417.45
8.0.100.0000.00717.36
8.0.90.0060.00317.09
8.0.80.0100.00817.40
8.0.70.0030.00517.29
8.0.60.0000.00917.27
8.0.50.0040.00417.17
8.0.30.0060.01217.63
8.0.20.0120.01117.44
8.0.10.0000.00817.52
8.0.00.0060.01317.11
7.4.330.0050.00015.55
7.4.320.0030.00316.94
7.4.300.0000.00617.03
7.4.290.0000.00817.01
7.4.280.0000.00816.86
7.4.270.0030.00316.93
7.4.260.0000.00613.59
7.4.250.0070.00016.71
7.4.240.0000.00716.93
7.4.230.0040.00416.64
7.4.220.0050.00216.83
7.4.210.0100.00716.94
7.4.200.0040.00416.76
7.4.130.0120.00616.81
7.4.120.0150.00916.99
7.4.110.0040.01416.86
7.4.100.0090.01116.97
7.4.90.0070.01016.76
7.4.80.0030.01919.39
7.4.70.0070.01016.85
7.4.60.0150.00316.48
7.4.50.0030.01916.75
7.4.40.0080.00916.52
7.4.30.0190.00316.95
7.4.20.0180.00016.48
7.4.10.0120.00916.57
7.4.00.0150.00416.99
7.3.330.0000.00816.65
7.3.320.0000.00613.43
7.3.310.0000.00716.62
7.3.300.0070.00016.67
7.3.290.0060.01016.64
7.3.260.0080.00916.92
7.3.240.0110.00716.72
7.3.230.0070.01016.66
7.3.210.0060.01316.79
7.3.200.0120.00616.91
7.3.190.0140.00316.92
7.3.180.0090.00916.46
7.3.170.0090.00916.54
7.3.160.0090.00916.44
7.3.150.0110.00816.80
7.3.140.0120.00616.51
7.3.130.0000.01716.71
7.3.120.0110.00816.66
7.3.110.0150.00316.39
7.3.100.0070.01116.40
7.3.90.0030.01216.55
7.3.80.0140.00316.46
7.3.70.0100.00616.55
7.3.60.0100.00716.60
7.3.50.0060.01216.57
7.3.40.0120.00616.46
7.3.30.0130.00316.43
7.3.20.0060.01116.48
7.3.10.0080.00916.71
7.3.00.0190.00416.68
7.2.330.0070.01117.02
7.2.320.0070.01316.98
7.2.310.0110.00717.07
7.2.300.0180.00616.89
7.2.290.0110.01116.75
7.2.280.0090.01216.97
7.2.270.0120.00616.88
7.2.260.0130.00616.89
7.2.250.0140.00717.12
7.2.240.0110.00817.01
7.2.230.0070.01017.07
7.2.220.0110.00616.97
7.2.210.0070.01016.76
7.2.200.0110.00616.80
7.2.190.0060.01816.77
7.2.180.0120.00616.75
7.2.170.0100.01016.74
7.2.160.0100.00716.84
7.2.150.0130.00416.70
7.2.140.0040.01416.74
7.2.130.0200.00016.92
7.2.120.0110.00716.75
7.2.110.0180.00016.86
7.2.100.0100.00916.85
7.2.90.0090.01217.04
7.2.80.0160.01317.06
7.2.70.0100.01316.82
7.2.60.0170.00316.82
7.2.50.0120.00616.87
7.2.40.0070.01116.84
7.2.30.0200.01216.86
7.2.20.0090.01017.04
7.2.10.0110.00916.74
7.2.00.0090.01517.04

preferences:
70.51 ms | 400 KiB | 5 Q