3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "~(?:f|ht)tps?://[a-z\d.-]+\.[a-z]{2,3}\S*~i"; $text = 'http://google.com and http://facebook.com?12345678901234567890123456789012345678901234567890 are big companies. A good example for shopping site is http://amazon.com'; echo preg_replace_callback($pattern, function($m) { return "<a href=\"{$m[0]}\" rel=\"nofollow\"><b>" . (strlen($m[0]) > 50 ? substr($m[0], 0, 50) . "..." : $m[0]) . "</b></a>"; }, $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.5.10.0100.01017.07
8.5.00.0100.01320.17
8.4.160.0160.00920.47
8.4.150.0030.00014.05
8.4.140.0110.01017.96
8.4.130.0150.00518.03
8.4.120.0100.00520.84
8.4.110.0100.01018.76
8.4.100.0140.00817.66
8.4.90.0130.00818.10
8.4.80.0060.01219.89
8.4.70.0120.00618.22
8.4.60.0120.01118.84
8.4.50.0120.00818.68
8.4.40.0050.00319.60
8.4.30.0030.01717.84
8.4.20.0060.00320.71
8.4.10.0040.00819.68
8.3.280.0060.00518.43
8.3.270.0140.00616.55
8.3.260.0040.00816.85
8.3.250.0120.00719.06
8.3.240.0110.00816.87
8.3.230.0150.00516.61
8.3.220.0060.00316.65
8.3.210.0100.01018.34
8.3.200.0050.00416.64
8.3.190.0120.00317.26
8.3.180.0160.00616.81
8.3.170.0150.00317.12
8.3.160.0150.00420.22
8.3.150.0060.01316.59
8.3.140.0030.00616.74
8.3.130.0030.00518.61
8.3.120.0000.00919.06
8.3.110.0060.00320.94
8.3.100.0030.00524.06
8.3.90.0110.00026.77
8.3.80.0120.00017.97
8.3.70.0200.00316.75
8.3.60.0160.00618.56
8.3.50.0060.01217.33
8.3.40.0080.01118.95
8.3.30.0000.01418.97
8.3.20.0050.00321.77
8.3.10.0040.00420.78
8.3.00.0040.00419.63
8.2.290.0110.00819.07
8.2.280.0130.00618.53
8.2.270.0090.00917.05
8.2.260.0000.00816.78
8.2.250.0000.00816.80
8.2.240.0060.00317.25
8.2.230.0060.00322.58
8.2.220.0160.00037.54
8.2.210.0000.00826.77
8.2.200.0060.00318.41
8.2.190.0110.00418.42
8.2.180.0070.00718.54
8.2.170.0150.00720.94
8.2.160.0090.00622.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00418.09
8.2.120.0050.00226.35
8.2.110.0100.00019.35
8.2.100.0080.00419.82
8.2.90.0080.00017.75
8.2.80.0030.00618.98
8.2.70.0070.00417.75
8.2.60.0080.00017.88
8.2.50.0000.00917.75
8.2.40.0000.00819.72
8.2.30.0000.00819.34
8.2.20.0070.00018.22
8.2.10.0030.00319.42
8.2.00.0000.00718.22
8.1.330.0160.00816.37
8.1.320.0090.00916.30
8.1.310.0040.00418.36
8.1.300.0150.00416.48
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0020.00520.21
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0110.00417.77
8.1.230.0140.00017.89
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0050.00317.35
8.1.180.0050.00318.10
8.1.170.0040.00418.96
8.1.160.0040.00418.98
8.1.150.0000.00719.00
8.1.140.0040.00418.93
8.1.130.0070.00017.59
8.1.120.0030.00317.69
8.1.110.0000.00917.53
8.1.100.0040.00417.52
8.1.90.0030.00517.64
8.1.80.0000.00817.54
8.1.70.0050.00317.62
8.1.60.0060.00317.77
8.1.50.0000.01017.68
8.1.40.0060.00317.68
8.1.30.0030.00617.87
8.1.20.0000.00917.82
8.1.10.0050.00217.75
8.1.00.0070.00017.69
8.0.300.0060.00318.94
8.0.290.0040.00416.88
8.0.280.0050.00318.48
8.0.270.0030.00317.20
8.0.260.0030.00316.85
8.0.250.0000.00717.04
8.0.240.0030.00317.00
8.0.230.0040.00417.02
8.0.220.0000.00716.99
8.0.210.0000.00717.04
8.0.200.0000.00617.16
8.0.190.0070.00017.00
8.0.180.0040.00416.99
8.0.170.0040.00417.07
8.0.160.0030.00617.01
8.0.150.0030.00516.92
8.0.140.0040.00317.02
8.0.130.0050.00313.52
8.0.120.0040.00417.05
8.0.110.0070.00016.88
8.0.100.0030.00517.11
8.0.90.0040.00417.00
8.0.80.0090.00917.00
8.0.70.0000.00817.04
8.0.60.0020.00516.95
8.0.50.0000.00716.92
8.0.30.0090.00717.45
8.0.20.0160.00417.33
8.0.10.0070.00017.24
8.0.00.0050.01217.00
7.4.330.0000.00615.55
7.4.320.0000.00716.72
7.4.300.0040.00416.70
7.4.290.0040.00416.65
7.4.280.0040.00416.70
7.4.270.0040.00416.83
7.4.260.0050.00516.85
7.4.250.0070.00016.66
7.4.240.0060.00316.88
7.4.230.0040.00416.66
7.4.220.0000.00716.77
7.4.210.0110.00516.83
7.4.200.0000.00716.64
7.4.160.0100.00916.74
7.4.140.0060.01217.86
7.4.130.0120.00616.80
7.4.120.0080.01416.83
7.4.110.0140.00416.67
7.4.100.0080.01116.75
7.4.90.0120.01216.77
7.4.80.0150.00819.39
7.4.70.0120.00816.79
7.4.60.0140.00416.76
7.4.50.0000.01316.72
7.4.40.0030.01316.74
7.4.00.0070.01115.11
7.3.330.0030.00313.32
7.3.320.0050.00013.29
7.3.310.0070.00016.50
7.3.300.0020.00516.40
7.3.290.0030.00316.27
7.3.280.0060.00916.39
7.3.260.0090.00916.54
7.3.240.0120.00716.51
7.3.230.0060.01216.68
7.3.210.0080.01016.62
7.3.200.0160.00016.45
7.3.190.0060.01216.66
7.3.180.0080.00816.68
7.3.170.0130.00416.48
7.3.160.0060.01016.52
7.3.20.0640.01014.89
7.3.10.0750.01714.65
7.3.00.0450.01014.73
7.2.330.0090.00916.92
7.2.320.0060.01216.88
7.2.310.0070.01116.99
7.2.300.0110.00716.99
7.2.290.0130.01016.70
7.2.150.0630.00715.10
7.2.140.0510.00715.38
7.2.130.0520.00315.29
7.2.120.0600.00615.05
7.2.110.0560.01015.41
7.2.100.0570.00715.39
7.2.90.0580.01315.23
7.2.80.0650.00015.36
7.2.70.0610.00615.30
7.2.60.0720.01015.37
7.2.50.0530.00715.21
7.2.40.0520.00315.52
7.2.30.0520.00315.39
7.2.20.0810.00015.38
7.2.10.0790.00315.33
7.2.00.0600.00015.12
7.1.250.0670.00613.88

preferences:
43.95 ms | 403 KiB | 5 Q