3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html=<<<HTML <h1><a href="http://www.website.com/article/slug-that-has-undetermined-amount-of-hyphens/12345">Whatever</a></h1> <p>Here is a url as plain text: http://www.website.com/article/sluggy-slug</p> <div>Here is a qualifying link: <a href="http://www.website.com/article/slugger-sluggington-jr/666">Whatever</a></div> HTML; $dom = new DomDocument(); $dom->loadHTML($html); foreach ($dom->getElementsByTagName('a') as $item) { $output[] = $item->getAttribute('href'); } var_export($output);

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.00.0070.00520.18
8.4.150.0020.00014.05
8.4.140.0100.01217.81
8.4.130.0050.00417.93
8.4.120.0120.00920.51
8.4.110.0110.01020.77
8.4.100.0120.01017.84
8.4.90.0130.00917.87
8.4.80.0170.00518.07
8.4.70.0130.00718.19
8.4.60.0030.00518.98
8.4.50.0120.00819.66
8.4.40.0120.00317.50
8.4.30.0160.00019.63
8.4.20.0090.01219.76
8.4.10.0070.01019.84
8.3.280.0020.00014.05
8.3.270.0100.00917.00
8.3.260.0050.00516.84
8.3.250.0120.00619.08
8.3.240.0130.00716.86
8.3.230.0100.00616.81
8.3.220.0080.00317.52
8.3.210.0060.00216.83
8.3.200.0070.00217.00
8.3.190.0120.00616.66
8.3.180.0100.00516.73
8.3.170.0090.00916.88
8.3.160.0180.00017.67
8.3.150.0130.00617.48
8.3.140.0070.01318.62
8.3.130.0040.00418.48
8.3.120.0090.00020.74
8.3.110.0060.00320.94
8.3.100.0090.00016.88
8.3.90.0040.00426.77
8.3.80.0120.00318.69
8.3.70.0120.00316.63
8.3.60.0030.01716.75
8.3.50.0100.00518.42
8.3.40.0070.00718.96
8.3.30.0110.00418.92
8.3.20.0080.00022.11
8.3.10.0080.00023.90
8.3.00.0080.00022.08
8.2.290.0060.00220.60
8.2.280.0100.00922.33
8.2.270.0050.00217.37
8.2.260.0050.00316.84
8.2.250.0090.00916.86
8.2.240.0120.00619.32
8.2.230.0130.00622.58
8.2.220.0140.00724.06
8.2.210.0000.00826.77
8.2.200.0120.00018.88
8.2.190.0120.00616.75
8.2.180.0090.00616.75
8.2.170.0000.01522.96
8.2.160.0170.00319.32
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00021.20
8.2.120.0040.00426.35
8.2.110.0000.00921.18
8.2.100.0040.01117.97
8.2.90.0060.00318.22
8.2.80.0080.00018.30
8.2.70.0080.00018.26
8.2.60.0030.00517.74
8.2.50.0040.00418.28
8.2.40.0050.00320.51
8.2.30.0040.00422.67
8.2.20.0000.00818.41
8.2.10.0000.00818.41
8.2.00.0000.00818.36
8.1.330.0130.00522.04
8.1.320.0140.00516.73
8.1.310.0070.00718.87
8.1.300.0100.00016.42
8.1.290.0060.00330.84
8.1.280.0090.01225.92
8.1.270.0080.00022.30
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00422.39
8.1.230.0030.01022.91
8.1.220.0080.00017.91
8.1.210.0080.00018.97
8.1.200.0050.00517.48
8.1.190.0030.00617.25
8.1.180.0000.00818.10
8.1.170.0000.00918.78
8.1.160.0050.00219.00
8.1.150.0000.00720.46
8.1.140.0030.00617.84
8.1.130.0000.00719.16
8.1.120.0080.00317.71
8.1.110.0000.00817.65
8.1.100.0070.00017.73
8.1.90.0030.00417.68
8.1.80.0050.00217.71
8.1.70.0040.00717.58
8.1.60.0040.00417.73
8.1.50.0000.00717.71
8.1.40.0080.00017.65
8.1.30.0040.00417.77
8.1.20.0030.00617.85
8.1.10.0060.00317.78
8.1.00.0000.00917.79
8.0.300.0000.00719.94
8.0.290.0000.00817.00
8.0.280.0040.00418.73
8.0.270.0030.00317.09
8.0.260.0000.00617.11
8.0.250.0030.00317.17
8.0.240.0000.00717.25
8.0.230.0030.00317.10
8.0.220.0040.00417.18
8.0.210.0040.00317.19
8.0.200.0000.00617.20
8.0.190.0090.00017.24
8.0.180.0050.00217.21
8.0.170.0080.00417.15
8.0.160.0090.00017.10
8.0.150.0040.00417.15
8.0.140.0000.00717.14
8.0.130.0030.00313.59
8.0.120.0000.00817.07
8.0.110.0000.00717.12
8.0.100.0000.00717.04
8.0.90.0040.00417.20
8.0.80.0100.01317.15
8.0.70.0040.00417.07
8.0.60.0050.00217.09
8.0.50.0080.00017.20
8.0.30.0120.00717.36
8.0.20.0100.00917.40
8.0.10.0000.00717.30
8.0.00.0080.00917.10
7.4.330.0050.00015.55
7.4.320.0080.00516.70
7.4.300.0030.00316.91
7.4.290.0070.00016.69
7.4.280.0040.00416.85
7.4.270.0040.00416.89
7.4.260.0030.00316.80
7.4.250.0000.00716.62
7.4.240.0040.00416.77
7.4.230.0050.00316.82
7.4.220.0040.00416.92
7.4.210.0070.01516.72
7.4.200.0080.00016.70
7.4.160.0050.01216.84
7.4.140.0120.00717.86
7.4.130.0040.01716.91
7.4.120.0100.00916.75
7.4.110.0130.00616.80
7.4.100.0070.01516.64
7.4.90.0060.01016.97
7.4.80.0090.01219.39
7.4.70.0120.00916.63
7.4.60.0150.00416.82
7.4.50.0060.00616.84
7.4.40.0030.01316.91
7.4.00.0050.00515.13
7.3.330.0050.00013.22
7.3.320.0030.00313.25
7.3.310.0030.00316.33
7.3.300.0030.00316.50
7.3.290.0080.00916.47
7.3.280.0080.00716.51
7.3.260.0150.00316.77
7.3.240.0130.00616.56
7.3.230.0100.00716.48
7.3.210.0140.00316.56
7.3.200.0100.00716.64
7.3.190.0130.00316.57
7.3.180.0030.01716.63
7.3.170.0080.00816.58
7.3.160.0070.01416.43
7.2.330.0120.00616.65
7.2.320.0030.01716.80
7.2.310.0160.01116.86
7.2.300.0030.01317.02
7.2.290.0140.01116.81
7.2.60.0150.00316.80
7.2.30.0130.01418.11
7.2.20.0170.01818.23
7.2.10.0170.01518.18
7.2.00.0100.01217.64
7.1.200.0030.01015.61
7.1.150.0160.01716.48
7.1.140.0170.01316.48
7.1.130.0180.00917.17
7.1.120.0180.01016.80
7.1.110.0170.00816.49
7.1.100.0190.00516.58
7.1.90.0190.01016.16
7.1.80.0160.01216.44
7.1.70.0110.01415.51
7.1.60.0410.01532.98
7.1.50.0350.01532.79
7.1.40.0290.01932.50
7.1.30.0260.01232.55
7.1.20.0270.01532.69
7.1.10.0440.01314.91
7.1.00.0110.01314.94

preferences:
31.86 ms | 403 KiB | 5 Q