3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT http://www.something.com and https://www.something.com</p> are working. Also http://www.something.com/some/thing/index.html works. www.something.com not and http://something.com. also gives a problem. Also https://something.com/something/else/test?something=true. This is a test for the URL thingy.This is a test for the URL thingy.This is.... etc.. TXT; if (preg_match_all('~(https?://|www)[a-z\d.-]+[\w/.?=&%:#]*\w~i', $text, $matches)) { foreach ($matches[0] as $url) { $prefix = stripos($url, 'www') === 0 ? 'http://' : ''; $text = str_replace($url, "<a href='{$prefix}{$url}'>{$url}</a>", $text); } } echo $text;

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.0080.00820.42
8.3.50.0060.00918.35
8.3.40.0090.00619.06
8.3.30.0100.00319.12
8.3.20.0040.00421.88
8.3.10.0040.00423.48
8.3.00.0080.00021.73
8.2.180.0100.01018.66
8.2.170.0110.00422.96
8.2.160.0070.00719.12
8.2.150.0040.00424.18
8.2.140.0110.00024.66
8.2.130.0030.00619.84
8.2.120.0080.00026.35
8.2.110.0100.00022.39
8.2.100.0060.00617.85
8.2.90.0050.00317.87
8.2.80.0080.00017.97
8.2.70.0000.00917.92
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0030.00519.42
8.2.30.0000.00719.42
8.2.20.0040.00418.17
8.2.10.0040.00420.67
8.2.00.0000.00819.46
8.1.280.0110.00725.92
8.1.270.0050.00318.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00722.30
8.1.230.0030.00819.27
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0030.00717.48
8.1.190.0000.00917.35
8.1.180.0050.00318.10
8.1.170.0030.00618.65
8.1.160.0000.00819.02
8.1.150.0080.00018.88
8.1.140.0000.00823.82
8.1.130.0030.00320.20
8.1.120.0000.00817.67
8.1.110.0000.00717.67
8.1.100.0000.00717.52
8.1.90.0040.00417.55
8.1.80.0080.00017.67
8.1.70.0050.00217.61
8.1.60.0040.00417.77
8.1.50.0030.00617.71
8.1.40.0040.00417.60
8.1.30.0090.00017.89
8.1.20.0030.00617.68
8.1.10.0030.00617.64
8.1.00.0080.00017.59
8.0.300.0040.00418.77
8.0.290.0000.00717.00
8.0.280.0000.00718.59
8.0.270.0030.00317.20
8.0.260.0080.00018.52
8.0.250.0080.00017.22
8.0.240.0040.00417.22
8.0.230.0030.00317.22
8.0.220.0000.00717.19
8.0.210.0000.00717.17
8.0.200.0030.00317.22
8.0.190.0030.00517.17
8.0.180.0040.00417.11
8.0.170.0030.00617.12
8.0.160.0000.00817.20
8.0.150.0040.00417.12
8.0.140.0070.00017.11
8.0.130.0000.00613.55
8.0.120.0070.00017.12
8.0.110.0000.00717.00
8.0.100.0040.00417.01
8.0.90.0000.00717.16
8.0.80.0050.01017.06
8.0.70.0070.00316.98
8.0.60.0040.00417.15
8.0.50.0000.00817.02
8.0.30.0150.00317.49
8.0.20.0140.00517.40
8.0.10.0050.00217.31
8.0.00.0100.00817.11
7.4.330.0060.00015.55
7.4.320.0000.00716.78
7.4.300.0030.00316.86
7.4.290.0000.00616.83
7.4.280.0040.00416.76
7.4.270.0000.00716.77
7.4.260.0000.00716.69
7.4.250.0040.00416.84
7.4.240.0000.00816.85
7.4.230.0030.00316.78
7.4.220.0040.00416.84
7.4.210.0080.00916.79
7.4.200.0000.00716.56
7.4.160.0080.00916.75
7.4.140.0120.01117.86
7.4.130.0140.00516.73
7.4.120.0120.00916.74
7.4.110.0030.01316.59
7.4.100.0100.01416.82
7.4.90.0080.01216.88
7.4.80.0080.01219.39
7.4.70.0130.00416.82
7.4.60.0060.01016.71
7.4.50.0070.00716.73
7.4.40.0180.00316.74
7.4.00.0030.01115.24
7.3.330.0030.00313.36
7.3.320.0050.00013.40
7.3.310.0030.00316.63
7.3.300.0030.00316.60
7.3.290.0030.00316.43
7.3.280.0090.00616.55
7.3.260.0110.01116.75
7.3.240.0080.00916.61
7.3.230.0150.00616.59
7.3.210.0100.00616.71
7.3.200.0030.01316.64
7.3.190.0000.02116.52
7.3.180.0100.00716.56
7.3.170.0130.01016.79
7.3.160.0030.01316.70
7.3.00.0690.01014.63
7.2.330.0060.01316.84
7.2.320.0080.01216.90
7.2.310.0100.00716.81
7.2.300.0160.00316.86
7.2.290.0070.01116.68
7.2.130.0230.00815.21
7.2.120.0310.00315.06
7.2.110.0280.01014.82
7.2.100.0410.01015.05
7.2.90.0330.01015.01
7.2.80.0390.00715.03
7.2.70.0240.01015.06
7.2.60.0280.00615.31
7.2.50.0380.00815.31
7.2.40.0330.00615.38
7.2.30.0290.01015.36
7.2.20.0300.00415.31
7.2.10.0240.00315.20
7.2.00.0270.00715.45
7.1.250.0310.00814.08
7.0.330.0360.00313.91
5.6.380.0120.00614.54

preferences:
61.75 ms | 401 KiB | 5 Q