3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA <a href="fruit.html">The Apple red</a> <a href="Construction.html#one">The big Home</a> <a href="automotive.html?lang=en">Car for rent</a> <a href="fruit.html">The Pineapple red</a> <a href="Construction.html#one">The biggest Home</a> <a href="automotive.html?lang=en">Cars for rent</a> DATA; $dom = new DOMDocument(); $dom->loadHTML($data); foreach($dom->getElementsByTagName("a") as $element) { if (preg_match('#\b(?:apple|big|car)\b#i', $element->nodeValue)) { echo $element->getAttribute("href") . PHP_EOL; } }

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.10.0090.01016.91
8.5.00.0160.00620.52
8.4.150.0030.00014.05
8.4.140.0050.00418.12
8.4.130.0090.01119.18
8.4.120.0100.00924.23
8.4.110.0100.00818.82
8.4.100.0090.01118.79
8.4.90.0100.01122.70
8.4.80.0070.00418.83
8.4.70.0050.00419.06
8.4.60.0130.00718.89
8.4.50.0100.01118.93
8.4.40.0060.01317.94
8.4.30.0100.00718.16
8.4.20.0080.01219.96
8.4.10.0100.01017.93
8.3.280.0140.00718.89
8.3.270.0110.00817.10
8.3.260.0080.00816.75
8.3.250.0030.00518.91
8.3.240.0130.00617.39
8.3.230.0140.00517.41
8.3.220.0030.00419.07
8.3.210.0090.00518.62
8.3.200.0050.00416.86
8.3.190.0060.01117.40
8.3.180.0090.00317.25
8.3.170.0150.00318.82
8.3.160.0120.00617.48
8.3.150.0150.00017.54
8.3.140.0080.00016.98
8.3.130.0030.00518.70
8.3.120.0090.00019.15
8.3.110.0060.01220.94
8.3.100.0000.00818.67
8.3.90.0090.00026.77
8.3.80.0000.01019.36
8.3.70.0100.01016.88
8.3.60.0090.00618.55
8.3.50.0100.00817.84
8.3.40.0120.00319.18
8.3.30.0120.00319.27
8.3.20.0050.00219.23
8.3.10.0030.00521.03
8.3.00.0040.00417.93
8.2.290.0110.00720.57
8.2.280.0130.00318.68
8.2.270.0130.00717.00
8.2.260.0090.00917.64
8.2.250.0140.00318.75
8.2.240.0030.00617.59
8.2.230.0030.00622.58
8.2.220.0000.01024.06
8.2.210.0110.00726.77
8.2.200.0030.00618.88
8.2.190.0060.01616.97
8.2.180.0140.00418.66
8.2.170.0060.00922.96
8.2.160.0160.00621.39
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00519.91
8.2.120.0040.00426.35
8.2.110.0030.00621.33
8.2.100.0040.00818.09
8.2.90.0090.00017.88
8.2.80.0030.00519.10
8.2.70.0040.00418.16
8.2.60.0060.00318.05
8.2.50.0000.00818.10
8.2.40.0040.00419.41
8.2.30.0070.00019.66
8.2.20.0100.00018.27
8.2.10.0060.00318.45
8.2.00.0030.00319.79
8.1.330.0140.00622.14
8.1.320.0120.00916.47
8.1.310.0080.00016.88
8.1.300.0050.00318.58
8.1.290.0030.00630.84
8.1.280.0180.00425.92
8.1.270.0080.00024.04
8.1.260.0140.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00324.08
8.1.230.0080.00421.14
8.1.220.0040.00418.91
8.1.210.0000.00918.77
8.1.200.0030.00617.73
8.1.190.0000.00817.47
8.1.180.0090.00318.10
8.1.170.0030.00518.77
8.1.160.0040.00419.19
8.1.150.0000.00819.16
8.1.140.0000.00717.93
8.1.130.0070.00019.24
8.1.120.0030.00617.83
8.1.110.0030.00517.79
8.1.100.0090.00017.87
8.1.90.0070.00017.86
8.1.80.0060.00317.86
8.1.70.0030.00317.79
8.1.60.0030.00617.93
8.1.50.0030.00517.92
8.1.40.0040.00417.92
8.1.30.0030.00517.90
8.1.20.0080.00018.03
8.1.10.0040.00417.95
8.1.00.0080.00017.78
8.0.300.0040.00418.77
8.0.290.0080.00017.13
8.0.280.0000.00818.55
8.0.270.0040.00417.48
8.0.260.0000.00719.12
8.0.250.0030.00317.38
8.0.240.0040.00417.34
8.0.230.0020.00517.39
8.0.220.0080.00417.30
8.0.210.0000.00717.19
8.0.200.0030.00517.38
8.0.190.0000.00817.29
8.0.180.0040.00417.33
8.0.170.0090.00017.32
8.0.160.0000.00717.30
8.0.150.0030.00617.21
8.0.140.0050.00217.19
8.0.130.0030.00313.67
8.0.120.0030.00517.30
8.0.110.0000.00817.23
8.0.100.0040.00417.13
8.0.90.0000.00817.32
8.0.80.0120.00717.20
8.0.70.0030.00517.28
8.0.60.0000.00717.39
8.0.50.0000.00717.34
8.0.30.0080.01117.59
8.0.20.0060.01217.52
8.0.10.0040.00417.48
8.0.00.0150.00717.07
7.4.330.0000.00615.55
7.4.320.0070.00016.88
7.4.300.0040.00416.87
7.4.290.0030.00316.91
7.4.280.0040.00416.91
7.4.270.0070.00017.02
7.4.260.0030.00316.97
7.4.250.0030.00316.84
7.4.240.0080.00016.99
7.4.230.0080.00016.96
7.4.220.0000.00917.05
7.4.210.0110.00616.81
7.4.200.0030.00317.07
7.4.160.0110.00616.92
7.4.140.0110.00917.86
7.4.130.0110.00717.00
7.4.120.0080.01016.88
7.4.110.0070.01017.14
7.4.100.0100.00716.75
7.4.90.0070.01016.96
7.4.80.0090.00919.39
7.4.70.0100.01016.97
7.4.60.0060.01116.65
7.4.50.0060.01016.73
7.4.40.0060.01216.74
7.4.00.0090.00815.27
7.3.330.0000.00513.48
7.3.320.0060.00013.49
7.3.310.0040.00416.63
7.3.300.0000.00816.50
7.3.290.0030.00316.61
7.3.280.0080.01116.64
7.3.260.0120.01016.84
7.3.240.0080.01116.79
7.3.230.0130.01016.77
7.3.210.0100.00716.73
7.3.200.0090.00616.61
7.3.190.0120.01016.64
7.3.180.0140.00316.78
7.3.170.0120.00616.48
7.3.160.0040.01316.71
7.3.120.0100.01014.97
7.3.110.0090.00914.90
7.3.100.0030.01215.07
7.3.90.0050.01015.22
7.3.80.0060.00914.99
7.3.70.0030.00914.95
7.3.60.0090.00514.89
7.3.50.0070.00815.08
7.3.40.0110.00314.91
7.3.30.0090.00415.19
7.3.20.0060.00916.83
7.3.10.0070.00916.86
7.3.00.0050.01216.83
7.2.330.0140.00916.94
7.2.320.0070.01317.04
7.2.310.0100.00617.04
7.2.300.0070.01016.91
7.2.290.0060.01216.94
7.2.250.0050.01415.50
7.2.240.0070.01315.38
7.2.230.0120.00415.30
7.2.220.0050.01215.24
7.2.210.0060.01115.21
7.2.200.0030.01215.21
7.2.190.0050.01315.31
7.2.180.0050.00815.32
7.2.170.0060.00815.39
7.2.130.0030.00917.22
7.2.120.0060.00917.07
7.2.110.0000.01317.44
7.2.100.0100.00317.16
7.2.90.0070.00716.95
7.2.80.0030.01217.21
7.2.70.0080.00617.53
7.2.60.1070.01016.08
7.2.50.1180.00615.94
7.2.40.0740.00916.27
7.2.30.0720.01416.33
7.2.20.0090.01016.14
7.2.10.1170.00516.38
7.2.00.1130.01116.27
7.1.330.0000.01416.09
7.1.320.0070.00716.23
7.1.310.0070.01016.08
7.1.300.0060.00815.96
7.1.290.0070.00415.94
7.1.280.0080.00615.86
7.1.270.0100.00715.99
7.1.260.0020.01415.96
7.1.250.0100.00316.22
7.1.200.0040.00716.10
7.1.170.0130.01314.17
7.1.160.0920.01317.07
7.1.150.0580.01017.28
7.1.140.0850.01116.91
7.1.130.1740.01017.42
7.1.120.1650.01217.12
7.1.110.1420.01116.36
7.1.100.1630.01216.39
7.1.90.0730.00916.47
7.1.80.1780.00816.61
7.1.70.1680.00915.30
7.1.60.1600.01433.46
7.1.50.1970.01633.08
7.1.40.1790.01732.90
7.1.30.2070.01933.12
7.1.20.1930.01333.07
7.1.10.1790.01215.09
7.1.00.1700.01315.19

preferences:
52.31 ms | 403 KiB | 5 Q