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[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.0090.00917.68
8.5.20.0080.00819.38
8.5.10.0100.00816.92
8.5.00.0100.01120.18
8.4.180.0140.00919.80
8.4.170.0150.00821.68
8.4.160.0140.00723.86
8.4.150.0090.00316.93
8.4.140.0130.00817.62
8.4.130.0080.00218.82
8.4.120.0150.00524.17
8.4.110.0160.00520.60
8.4.100.0030.00517.84
8.4.90.0030.00620.77
8.4.80.0060.00518.76
8.4.70.0080.01220.79
8.4.60.0050.01122.38
8.4.50.0090.01122.34
8.4.40.0120.00817.99
8.4.30.0030.00620.33
8.4.20.0150.00617.86
8.4.10.0030.00619.71
8.3.300.0130.00820.88
8.3.290.0120.00920.85
8.3.280.0130.00718.69
8.3.270.0120.01016.96
8.3.260.0130.00816.82
8.3.250.0070.00118.97
8.3.240.0140.00617.24
8.3.230.0110.00816.70
8.3.220.0040.00519.17
8.3.210.0060.00216.75
8.3.200.0040.00516.69
8.3.190.0070.00318.99
8.3.180.0110.00418.88
8.3.170.0070.01119.02
8.3.160.0160.00316.85
8.3.150.0070.01116.60
8.3.140.0090.00019.14
8.3.130.0000.00816.98
8.3.120.0080.01118.98
8.3.110.0080.00820.94
8.3.100.0100.00016.92
8.3.90.0040.00426.77
8.3.80.0070.00316.75
8.3.70.0120.00316.63
8.3.60.0040.01118.55
8.3.50.0200.01024.57
8.3.40.0070.00719.04
8.3.30.0070.00719.06
8.3.20.0000.00921.54
8.3.10.0000.00822.05
8.3.00.0050.00323.52
8.2.300.0130.00822.23
8.2.290.0080.01220.25
8.2.280.0080.01020.47
8.2.270.0090.00916.79
8.2.260.0080.00017.07
8.2.250.0110.00418.74
8.2.240.0040.00419.11
8.2.230.0070.00322.58
8.2.220.0160.00024.06
8.2.210.0040.00426.77
8.2.200.0060.00316.88
8.2.190.0150.00316.88
8.2.180.0120.00425.92
8.2.170.0040.01119.15
8.2.160.0030.01021.34
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00020.75
8.2.110.0050.00522.35
8.2.100.0090.00918.62
8.2.90.0090.00618.36
8.2.80.0150.00418.98
8.2.70.0080.00618.52
8.2.60.0130.01018.57
8.2.50.0130.00019.12
8.2.40.0090.00920.13
8.2.30.0060.00319.19
8.2.20.0080.00618.51
8.2.10.0140.00419.28
8.2.00.0100.00219.25
8.1.340.0110.01117.89
8.1.330.0150.00422.15
8.1.320.0100.01022.20
8.1.310.0080.00016.72
8.1.300.0000.00818.03
8.1.290.0030.00630.84
8.1.280.0140.00325.92
8.1.270.0000.00823.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0070.00521.33
8.1.230.0100.00419.76
8.1.220.0090.00318.30
8.1.210.0080.00419.34
8.1.200.0100.00218.06
8.1.190.0070.00417.97
8.1.180.0080.00518.80
8.1.170.0070.00518.56
8.1.160.0140.00318.81
8.1.150.0090.00219.79
8.1.140.0080.00318.87
8.1.130.0060.00519.46
8.1.120.0070.00518.16
8.1.110.0070.00417.96
8.1.100.0060.00717.84
8.1.90.0070.00617.84
8.1.80.0100.00317.85
8.1.70.0110.00118.01
8.1.60.0090.00717.82
8.1.50.0100.00617.97
8.1.40.0100.00217.98
8.1.30.0110.00318.11
8.1.20.0090.00518.17
8.1.10.0160.00317.96
8.1.00.0060.00717.80
8.0.300.0120.00718.48
8.0.290.0110.00217.51
8.0.280.0070.00418.21
8.0.270.0070.00517.58
8.0.260.0090.00418.30
8.0.250.0070.00517.58
8.0.240.0130.00017.30
8.0.230.0080.00417.41
8.0.220.0100.00217.16
8.0.210.0080.00616.98
8.0.200.0090.00417.45
8.0.190.0090.00417.40
8.0.180.0080.00617.31
8.0.170.0090.00317.28
8.0.160.0090.00517.38
8.0.150.0110.00217.32
8.0.140.0150.00517.42
8.0.130.0090.00416.31
8.0.120.0100.00717.32
8.0.110.0140.00517.46
8.0.100.0110.00717.40
8.0.90.0140.00317.31
8.0.80.0100.00517.37
8.0.70.0090.00417.33
8.0.60.0080.00617.38
8.0.50.0130.00417.34
8.0.30.0170.00517.26
8.0.20.0150.00617.38
8.0.10.0130.00617.59
8.0.00.0050.01118.67
7.4.330.0100.00014.90
7.4.320.0070.00517.11
7.4.300.0040.00617.17
7.4.290.0060.00516.92
7.4.280.0100.00416.86
7.4.270.0070.00516.95
7.4.260.0080.00315.92
7.4.250.0050.00517.05
7.4.240.0070.00416.94
7.4.230.0070.00717.03
7.4.220.0050.00817.03
7.4.210.0080.00816.96
7.4.200.0080.00617.00
7.4.190.0150.00717.22
7.4.180.0140.00317.13
7.4.160.0120.00517.14
7.4.150.0070.00417.09
7.4.140.0110.00617.22
7.4.130.0130.00716.94
7.4.120.0120.00816.97
7.4.110.0130.00717.10
7.4.100.0140.00316.99
7.4.90.0120.00816.96
7.4.80.0150.00517.84
7.4.70.0110.00516.88
7.4.60.0120.00817.01
7.4.50.0100.00516.95
7.4.40.0120.00517.06
7.4.30.0150.00916.93
7.4.20.0120.01416.85
7.4.10.0150.00416.89
7.4.00.0110.00616.97
7.3.330.0060.00516.98
7.3.320.0120.00315.88
7.3.310.0080.00916.91
7.3.300.0160.00416.82
7.3.290.0100.00616.73
7.3.280.0140.00816.99
7.3.270.0090.00816.99
7.3.260.0130.00416.88
7.3.250.0170.00017.15
7.3.240.0110.00916.76
7.3.230.0220.00416.95
7.3.220.0240.00216.84
7.3.210.0130.00616.92
7.3.200.0150.00316.98
7.3.190.0080.00916.79
7.3.180.0140.00316.91
7.3.170.0160.00516.91
7.3.160.0160.00316.82
7.3.150.0180.00216.75
7.3.140.0100.00916.89
7.3.130.0130.00616.94
7.3.120.0110.00716.87
7.3.110.0150.00416.88
7.3.100.0120.00516.91
7.3.90.0120.00717.00
7.3.80.0140.00416.79
7.3.70.0110.00716.82
7.3.60.0090.00816.90
7.3.50.0090.00816.90
7.3.40.0140.00316.99
7.3.30.0110.00616.96
7.3.20.0130.00617.53
7.3.10.0170.00217.48
7.3.00.0110.00517.48
7.2.340.0120.00117.34
7.2.330.0130.00417.11
7.2.320.0110.00617.16
7.2.310.0090.00817.12
7.2.300.0110.00617.12
7.2.290.0100.00817.04
7.2.280.0150.00517.05
7.2.270.0160.00516.99
7.2.260.0110.00917.04
7.2.250.0160.00617.03
7.2.240.0160.00717.08
7.2.230.0140.00917.03
7.2.220.0130.00317.06
7.2.210.0090.00817.09
7.2.200.0150.00816.96
7.2.190.0220.00117.03
7.2.180.0180.00617.06
7.2.170.0140.00917.00
7.2.160.0090.01017.03
7.2.150.0150.00417.67
7.2.140.0140.00817.85
7.2.130.0100.00817.74
7.2.120.0140.00717.68
7.2.110.0150.00817.82
7.2.100.0250.00617.72
7.2.90.0130.00817.80
7.2.80.0140.00917.79
7.2.70.0170.00717.81
7.2.60.0200.00817.64
7.2.50.0190.00717.61
7.2.40.0180.00717.83
7.2.30.0150.00717.75
7.2.20.0170.00917.76
7.2.10.0200.00217.66
7.2.00.0090.00717.69

preferences:
53.36 ms | 1581 KiB | 5 Q