3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOT <html> Some html <a class="title" href="showthread.php?t=XXXXX" id="thread_title_5">DATADATA</a> More html <a class="title" href="showthread.php?t=987654" id="thread_title_1234">inner text</a> </html> EOT; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach ($xpath->query('//a[starts-with(@href, "showthread.php")]') as $node) { parse_str(parse_url($node->getAttribute('href'), PHP_URL_QUERY), $queryString); printf( "t: %s\ntitle: %s\ninnerHTML: %s\n---\n", $queryString['t'] ?? 'no query string', filter_var($node->getAttribute('id'), FILTER_SANITIZE_NUMBER_INT), $node->nodeValue ); }

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.5.30.0120.00717.80
8.5.20.0080.01120.63
8.5.10.0090.00917.06
8.5.00.0130.00920.34
8.4.180.0170.01120.11
8.4.170.0120.01122.18
8.4.160.0140.00924.02
8.4.150.0060.00617.97
8.4.140.0140.00918.02
8.4.130.0050.00418.26
8.4.120.0140.00520.81
8.4.110.0070.00622.85
8.4.100.0140.00618.37
8.4.90.0170.00418.23
8.4.80.0050.00520.03
8.4.70.0050.00418.35
8.4.60.0120.00919.30
8.4.50.0120.00519.81
8.4.40.0140.00718.05
8.4.30.0100.01020.95
8.4.20.0040.01524.59
8.4.10.0030.00619.70
8.3.300.0110.01018.92
8.3.290.0120.00821.08
8.3.280.0070.01218.77
8.3.270.0120.01016.67
8.3.260.0160.00417.00
8.3.250.0120.00619.07
8.3.240.0060.00216.79
8.3.230.0040.00516.86
8.3.220.0120.00717.38
8.3.210.0110.00816.77
8.3.200.0050.00416.91
8.3.190.0130.00717.65
8.3.180.0110.00816.79
8.3.170.0030.01517.18
8.3.160.0080.00017.21
8.3.150.0060.00319.32
8.3.140.0070.01117.12
8.3.130.0030.00618.57
8.3.120.0000.00920.85
8.3.110.0000.00820.94
8.3.100.0060.00318.79
8.3.90.0100.00026.77
8.3.80.0050.00519.36
8.3.70.0070.00717.12
8.3.60.0110.01116.87
8.3.50.0100.00823.93
8.3.40.0040.01120.43
8.3.30.0100.00619.16
8.3.20.0060.00324.18
8.3.10.0080.00024.66
8.3.00.0030.00526.16
8.2.300.0110.01019.15
8.2.290.0110.00820.75
8.2.280.0100.00918.94
8.2.270.0130.00616.94
8.2.260.0030.00621.00
8.2.250.0030.00518.84
8.2.240.0070.00317.44
8.2.230.0070.00322.58
8.2.220.0030.00624.06
8.2.210.0110.00726.77
8.2.200.0060.00318.88
8.2.190.0100.01016.87
8.2.180.0120.00325.92
8.2.170.0140.00319.27
8.2.160.0100.00722.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00326.35
8.2.110.0090.00019.55
8.2.100.0090.00318.28
8.2.90.0040.00418.13
8.2.80.0040.00419.06
8.2.70.0080.00018.18
8.2.60.0060.00318.41
8.2.50.0000.00918.10
8.2.40.0060.00319.72
8.2.30.0000.00818.56
8.2.20.0020.00518.33
8.2.10.0040.00419.55
8.2.00.0060.00319.55
8.1.340.0090.01317.93
8.1.330.0090.01220.37
8.1.320.0110.00816.34
8.1.310.0100.00016.95
8.1.300.0090.00018.27
8.1.290.0100.00030.84
8.1.280.0150.00325.92
8.1.270.0130.00722.23
8.1.260.0000.00828.09
8.1.250.0000.00828.09
8.1.240.0070.00319.79
8.1.230.0040.00821.34
8.1.220.0090.00018.89
8.1.210.0040.00418.77
8.1.200.0050.00317.73
8.1.190.0030.00617.48
8.1.180.0050.00318.10
8.1.170.0050.00518.86
8.1.160.0040.00419.22
8.1.150.0040.00419.23
8.1.140.0060.00319.13
8.1.130.0000.00720.48
8.1.120.0040.00417.85
8.1.110.0080.00017.84
8.1.100.0030.00617.75
8.1.90.0040.00417.85
8.1.80.0030.00617.64
8.1.70.0000.00717.81
8.1.60.0030.00517.85
8.1.50.0030.00717.88
8.1.40.0040.00417.79
8.1.30.0000.00817.94
8.1.20.0030.00617.92
8.1.10.0030.00517.84
8.1.00.0040.00417.92
8.0.300.0030.00518.86
8.0.290.0060.00317.13
8.0.280.0000.00718.73
8.0.270.0030.00318.36
8.0.260.0030.00318.86
8.0.250.0030.00317.30
8.0.240.0030.00317.23
8.0.230.0030.00317.39
8.0.220.0000.00817.35
8.0.210.0000.00717.18
8.0.200.0000.00817.41
8.0.190.0040.00417.35
8.0.180.0060.00317.30
8.0.170.0060.00317.38
8.0.160.0040.00417.33
8.0.150.0000.00817.20
8.0.140.0080.00017.18
8.0.130.0000.00613.75
8.0.120.0000.00817.14
8.0.110.0040.00417.18
8.0.100.0040.00417.28
8.0.90.0040.00417.18
8.0.80.0100.00817.22
8.0.70.0090.00017.15
8.0.60.0000.00717.18
8.0.50.0070.00017.15
8.0.30.0170.00017.43
8.0.20.0070.01117.34
8.0.10.0040.00417.43
8.0.00.0060.01217.20
7.4.330.0030.00315.55
7.4.320.0040.00416.76
7.4.300.0000.00717.01
7.4.290.0040.00416.85
7.4.280.0050.00416.91
7.4.270.0080.00016.93
7.4.260.0030.00313.70
7.4.250.0000.00716.77
7.4.240.0020.00516.88
7.4.230.0000.00716.71
7.4.220.0020.00517.03
7.4.210.0080.00716.98
7.4.200.0040.00416.83
7.4.130.0150.00316.87
7.4.120.0090.01316.78
7.4.110.0110.00716.88
7.4.100.0040.01416.70
7.4.90.0090.01416.75
7.4.80.0110.01116.88
7.4.70.0040.01416.82
7.4.60.0060.01216.82
7.4.50.0090.00916.64
7.4.40.0100.01416.68
7.4.30.0070.01716.71
7.4.20.0130.01017.05
7.4.10.0130.00516.95
7.4.00.0130.01016.91
7.3.330.0060.00316.56
7.3.320.0050.00513.49
7.3.310.0000.00816.66
7.3.300.0030.00516.56
7.3.290.0060.01216.67
7.3.260.0130.00616.59
7.3.230.0160.00916.61
7.3.220.0120.00616.71
7.3.210.0160.00316.55
7.3.200.0080.01216.73
7.3.190.0140.00316.68
7.3.180.0110.00616.76
7.3.170.0030.01316.65
7.3.160.0190.00616.75
7.3.150.0140.00716.76
7.3.140.0120.01216.81
7.3.130.0090.01216.93
7.3.120.0070.01016.77
7.3.110.0090.00916.85
7.3.100.0030.01616.71
7.3.90.0120.00916.93
7.3.80.0100.01316.74
7.3.70.0100.00716.77
7.3.60.0130.00716.59
7.3.50.0100.01216.51
7.3.40.0090.01116.67
7.3.30.0180.00016.79
7.3.20.0100.00718.34
7.3.10.0100.01418.63
7.3.00.0160.00618.45
7.2.330.0150.00616.99
7.2.320.0180.00016.87
7.2.310.0130.00616.71
7.2.300.0090.00816.64
7.2.290.0120.00617.06
7.2.280.0030.01816.79
7.2.270.0060.01216.82
7.2.260.0030.01716.84
7.2.250.0130.00516.95
7.2.240.0090.00917.06
7.2.230.0100.01316.75
7.2.220.0130.00716.93
7.2.210.0120.00616.86
7.2.200.0130.01017.05
7.2.190.0120.00616.77
7.2.180.0150.00316.98
7.2.170.0160.00317.04
7.2.160.0060.01216.91
7.2.150.0150.00918.91
7.2.140.0040.01718.71
7.2.130.0100.01318.63
7.2.120.0130.00618.50
7.2.110.0090.01518.55
7.2.100.0100.00918.82
7.2.90.0120.00618.59
7.2.80.0130.01018.62
7.2.70.0120.01218.47
7.2.60.0160.00718.74
7.2.50.0080.01518.76
7.2.40.0090.00918.88
7.2.30.0070.01718.47
7.2.20.0090.00918.64
7.2.10.0120.01218.89
7.2.00.0170.00718.81

preferences:
50.98 ms | 1504 KiB | 5 Q