3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<STR Hello @username you need to check this http://github.com and @username you need to https://stackoverflow.com/questions/ask or https://stackoverflow.com STR; $pattern = "~(?<!\S)(?:(@[^\s@]+)(?!\S)[^h]*(?:h(?!ttp)[^h]*)*+)?\K((?:https?|ftp|file)://\S+)~"; $result = preg_replace_callback($pattern, function($m){ return sprintf('<a href="%s">%s</a>', $m[2],$m[1] ?? $m[2]); }, $string); echo $result;

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.00517.30
8.5.20.0100.00819.48
8.5.10.0080.01016.93
8.5.00.0160.00620.02
8.4.180.0130.01119.90
8.4.170.0130.00819.79
8.4.160.0120.00923.75
8.4.150.0070.00617.00
8.4.140.0120.00917.81
8.4.130.0100.00717.88
8.4.120.0100.00622.41
8.4.110.0140.00519.02
8.4.100.0100.01117.86
8.4.90.0140.00620.52
8.4.80.0120.00618.82
8.4.70.0040.00518.88
8.4.60.0100.01018.67
8.4.50.0130.00822.50
8.4.40.0080.01217.94
8.4.30.0080.00020.44
8.4.20.0120.00317.77
8.4.10.0030.00619.98
8.3.300.0120.00920.43
8.3.290.0170.00520.75
8.3.280.0070.00616.41
8.3.270.0110.00916.82
8.3.260.0090.01116.79
8.3.250.0120.00619.12
8.3.240.0100.00616.90
8.3.230.0110.00116.66
8.3.220.0110.00719.05
8.3.210.0100.00816.87
8.3.200.0050.00316.78
8.3.190.0100.00217.16
8.3.180.0090.00719.02
8.3.170.0130.00616.97
8.3.160.0150.00316.95
8.3.150.0110.00817.17
8.3.140.0030.00617.15
8.3.130.0030.00518.47
8.3.120.0080.00820.77
8.3.110.0090.00018.46
8.3.100.0060.00318.44
8.3.90.0150.00618.41
8.3.80.0000.00918.55
8.3.70.0100.01316.75
8.3.60.0090.00616.74
8.3.50.0120.00624.63
8.3.40.0070.01319.04
8.3.30.0120.00918.95
8.3.20.0080.00021.85
8.3.10.0040.00421.98
8.3.00.0000.00823.65
8.2.300.0140.00718.74
8.2.290.0100.01016.60
8.2.280.0070.00318.51
8.2.270.0110.00716.95
8.2.260.0040.00416.81
8.2.250.0120.00317.05
8.2.240.0070.01117.15
8.2.230.0030.00620.94
8.2.220.0090.00024.06
8.2.210.0040.00426.77
8.2.200.0090.00017.00
8.2.190.0150.00616.58
8.2.180.0120.00916.63
8.2.170.0110.01122.96
8.2.160.0130.00321.18
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0040.00426.16
8.2.110.0070.00321.11
8.2.100.0080.00418.16
8.2.90.0000.00819.22
8.2.80.0040.00418.03
8.2.70.0040.00418.00
8.2.60.0040.00417.75
8.2.50.0000.00817.63
8.2.40.0000.00820.07
8.2.30.0050.00318.17
8.2.20.0050.00318.04
8.2.10.0050.00319.31
8.2.00.0040.00419.22
8.1.340.0110.00921.70
8.1.330.0100.00916.41
8.1.320.0020.00718.01
8.1.310.0080.00018.37
8.1.300.0060.00318.06
8.1.290.0090.00018.88
8.1.280.0150.00625.92
8.1.270.0030.00621.89
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00320.96
8.1.230.0040.00717.77
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0000.00718.92
8.1.160.0080.00018.98
8.1.150.0000.00718.94
8.1.140.0000.00818.92
8.1.130.0030.00320.22
8.1.120.0040.00417.69
8.1.110.0050.00317.52
8.1.100.0040.00417.65
8.1.90.0040.00417.63
8.1.80.0030.00617.64
8.1.70.0040.00417.61
8.1.60.0050.00317.81
8.1.50.0030.00517.68
8.1.40.0000.00817.65
8.1.30.0070.00017.66
8.1.20.0040.00417.78
8.1.10.0040.00417.66
8.1.00.0040.00417.69
8.0.300.0030.00518.77
8.0.290.0000.00917.13
8.0.280.0000.00718.41
8.0.270.0030.00318.29
8.0.260.0000.00718.51
8.0.250.0000.00717.18
8.0.240.0040.00417.09
8.0.230.0030.00317.09
8.0.220.0000.00717.07
8.0.210.0050.00317.09
8.0.200.0040.00417.08
8.0.190.0070.00017.19
8.0.180.0000.00817.01
8.0.170.0100.00017.07
8.0.160.0000.00717.12
8.0.150.0000.00717.04
8.0.140.0050.00217.07
8.0.130.0030.00313.54
8.0.120.0050.00317.08
8.0.110.0040.00417.01
8.0.100.0080.00017.10
8.0.90.0000.00917.05
8.0.80.0070.00917.03
8.0.70.0040.00417.01
8.0.60.0040.00416.97
8.0.50.0000.00717.06
8.0.30.0090.01317.20
8.0.20.0090.00917.46
8.0.10.0030.00517.17
8.0.00.0120.00617.02
7.4.330.0030.00315.55
7.4.320.0060.00016.75
7.4.300.0040.00416.68
7.4.290.0070.00016.73
7.4.280.0000.00816.85
7.4.270.0000.00716.84
7.4.260.0030.00313.52
7.4.250.0030.00316.69
7.4.240.0020.00616.68
7.4.230.0070.00016.90
7.4.220.0000.00716.70
7.4.210.0100.00616.79
7.4.200.0000.00716.86
7.4.130.0100.00816.79
7.4.120.0060.01616.81
7.4.110.0060.01316.74
7.4.100.0100.01016.63
7.4.90.0150.00716.69
7.4.80.0100.00619.39
7.4.70.0130.00316.86
7.4.60.0030.01416.79
7.4.50.0000.01216.72
7.4.40.0130.00616.72
7.4.30.0110.00616.79
7.4.20.0060.01116.49
7.4.10.0030.01216.72
7.4.00.0060.01016.83
7.3.330.0050.00316.63
7.3.320.0060.00013.60
7.3.310.0070.00016.55
7.3.300.0070.00016.64
7.3.290.0060.01016.57
7.3.260.0210.00316.93
7.3.240.0120.00816.68
7.3.230.0130.00716.67
7.3.210.0100.00716.74
7.3.200.0060.01216.96
7.3.190.0030.01316.57
7.3.180.0060.01016.65
7.3.170.0080.00816.62
7.3.160.0090.00916.53
7.3.150.0130.00316.58
7.3.140.0100.01016.72
7.3.130.0090.00916.68
7.3.120.0100.00716.59
7.3.110.0130.00316.70
7.3.100.0120.00616.74
7.3.90.0060.00916.69
7.3.80.0120.00316.53
7.3.70.0040.01216.61
7.3.60.0080.00816.60
7.3.50.0130.00316.59
7.3.40.0080.00816.64
7.3.30.0090.00916.61
7.3.20.0090.00916.43
7.3.10.0180.00016.48
7.3.00.0070.01516.62
7.2.330.0130.00416.83
7.2.320.0040.01516.94
7.2.310.0030.01416.70
7.2.300.0120.00916.96
7.2.290.0070.01116.83
7.2.280.0090.00916.92
7.2.270.0030.01416.75
7.2.260.0140.00316.79
7.2.250.0070.01016.76
7.2.240.0060.01216.82
7.2.230.0110.00616.65
7.2.220.0100.00716.71
7.2.210.0140.00716.64
7.2.200.0140.00316.92
7.2.190.0090.00917.06
7.2.180.0030.01716.59
7.2.170.0030.01316.83
7.2.160.0140.00616.81
7.2.150.0270.03116.70
7.2.140.0030.01416.72
7.2.130.0100.01316.68
7.2.120.0110.00616.83
7.2.110.0100.00716.89
7.2.100.0170.00016.93
7.2.90.0100.00716.71
7.2.80.0000.01616.83
7.2.70.0100.00716.76
7.2.60.0000.01816.95
7.2.50.0090.00916.86
7.2.40.0100.00716.69
7.2.30.0110.00717.06
7.2.20.0070.01016.88
7.2.10.0150.00816.88
7.2.00.0070.01416.90

preferences:
59.03 ms | 1523 KiB | 5 Q