3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "http://www.google.com/\r\nhttp://www.google.com/\r\nhttp://www.google.com/"; $matches[0] = preg_replace('/(http|ftp)+(s)?:(\/\/)((\w|\.|\-)+)(\/)?(\S)+/i', '[url]\0[\4]',$text); print_r($matches[0]);

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.0040.01418.31
8.3.50.0110.00821.27
8.3.40.0090.00618.96
8.3.30.0070.00720.34
8.3.20.0050.00320.64
8.3.10.0050.00221.09
8.3.00.0000.00823.65
8.2.180.0130.00317.00
8.2.170.0000.01522.96
8.2.160.0040.01120.40
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00521.23
8.2.110.0090.00019.45
8.2.100.0040.00817.79
8.2.90.0080.00017.91
8.2.80.0030.00517.97
8.2.70.0070.00317.88
8.2.60.0030.00618.04
8.2.50.0000.01018.07
8.2.40.0040.00420.07
8.2.30.0060.00319.39
8.2.20.0000.00817.69
8.2.10.0040.00417.82
8.2.00.0000.00717.82
8.1.280.0130.00725.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0100.00321.84
8.1.230.0040.00820.96
8.1.220.0000.00817.74
8.1.210.0050.00318.85
8.1.200.0090.00017.48
8.1.190.0050.00217.41
8.1.180.0000.00818.10
8.1.170.0040.00418.67
8.1.160.0040.00418.85
8.1.150.0040.00418.72
8.1.140.0000.00817.54
8.1.130.0080.00017.80
8.1.120.0030.00317.51
8.1.110.0040.00417.40
8.1.100.0000.00717.54
8.1.90.0000.00717.45
8.1.80.0000.00717.54
8.1.70.0040.00417.50
8.1.60.0030.00717.65
8.1.50.0040.00417.58
8.1.40.0000.00817.61
8.1.30.0030.00517.76
8.1.20.0040.00417.72
8.1.10.0070.00017.64
8.1.00.0040.00417.48
8.0.300.0070.00019.85
8.0.290.0040.00416.92
8.0.280.0030.00318.40
8.0.270.0030.00317.20
8.0.260.0030.00316.86
8.0.250.0040.00417.05
8.0.240.0040.00417.02
8.0.230.0000.00816.96
8.0.220.0030.00316.87
8.0.210.0040.00416.84
8.0.200.0060.00016.91
8.0.190.0030.00517.06
8.0.180.0040.00417.03
8.0.170.0030.00416.99
8.0.160.0050.00316.97
8.0.150.0030.00316.93
8.0.140.0000.00716.95
8.0.130.0030.00313.39
8.0.120.0080.00016.84
8.0.110.0070.00016.95
8.0.100.0000.00716.77
8.0.90.0000.00816.91
8.0.80.0130.00317.02
8.0.70.0040.00416.96
8.0.60.0000.00716.98
8.0.50.0080.00017.04
8.0.30.0110.00816.83
8.0.20.0100.00817.40
8.0.10.0050.00217.07
8.0.00.0120.00816.69
7.4.330.0000.00616.74
7.4.320.0000.00716.80
7.4.300.0000.00616.75
7.4.290.0070.00016.72
7.4.280.0000.00716.56
7.4.270.0070.00016.76
7.4.260.0030.00313.46
7.4.250.0050.00216.63
7.4.240.0000.00716.78
7.4.230.0070.00016.46
7.4.220.0060.01916.69
7.4.210.0040.01116.68
7.4.200.0000.00716.82
7.4.190.0040.00416.80
7.4.160.0180.00616.43
7.4.150.0120.00617.40
7.4.140.0190.02617.86
7.4.130.0120.00916.60
7.4.120.0110.00816.74
7.4.110.0000.01816.49
7.4.100.0100.00716.69
7.4.90.0090.01216.73
7.4.80.0090.00919.39
7.4.70.0070.01016.60
7.4.60.0060.00916.66
7.4.50.0040.00416.74
7.4.40.0060.00622.77
7.4.30.0030.01316.69
7.4.00.0070.01015.15
7.3.330.0030.00313.15
7.3.320.0020.00213.14
7.3.310.0000.00716.25
7.3.300.0000.00616.36
7.3.290.0050.01016.45
7.3.280.0060.01116.44
7.3.270.0120.00617.40
7.3.260.0100.01018.24
7.3.250.0080.00916.41
7.3.240.0060.01016.71
7.3.230.0080.01216.77
7.3.210.0070.01116.45
7.3.200.0100.01319.39
7.3.190.0110.00716.61
7.3.180.0130.00316.48
7.3.170.0060.00916.54
7.3.160.0100.01216.79
7.3.120.0090.00615.11
7.2.330.0160.00316.78
7.2.320.0090.00916.64
7.2.310.0090.00816.55
7.2.300.0140.00416.70
7.2.290.0060.00916.82
7.2.00.0090.00619.73
7.1.100.0000.01118.58
7.1.70.0000.00817.43
7.1.60.0120.01219.17
7.1.50.0130.01017.16
7.1.00.0030.06322.50
7.0.200.0070.00016.76
7.0.140.0100.06721.95
7.0.60.0100.07321.73
7.0.50.0030.05017.89
7.0.40.0000.08720.07
7.0.30.0270.07320.20
7.0.20.0300.04020.18
7.0.10.0100.05320.18
7.0.00.0100.05320.14
5.6.280.0030.07321.14
5.6.210.0030.07020.43
5.6.200.0030.08318.22
5.6.190.0070.05320.34
5.6.180.0300.04320.57
5.6.170.0330.07720.63
5.6.160.0100.04020.52
5.6.150.0070.08018.16
5.6.140.0130.08018.22
5.6.130.0030.04318.16
5.6.120.0070.08021.00
5.6.110.0130.08021.12
5.6.100.0030.07720.97
5.6.90.0000.04720.94
5.6.80.0130.05720.49
5.5.350.4430.04320.52
5.5.340.0170.07017.94
5.5.330.0070.04020.22
5.5.320.0530.07020.29
5.5.310.0370.07020.20
5.5.300.0030.06717.92
5.5.290.0030.08317.98
5.5.280.0100.07720.86
5.5.270.0130.07720.83
5.5.260.0130.07020.87
5.5.250.0130.06020.79
5.5.240.0030.07320.18
5.4.450.4070.04019.20
5.4.440.0030.08319.55
5.4.430.3830.04019.41
5.4.420.3700.03719.39
5.4.410.3530.04019.13
5.4.400.3430.03319.05
5.4.390.3670.04019.18
5.4.380.3900.03019.07
5.4.370.4070.03019.00
5.4.360.3830.04018.89
5.4.350.4200.04019.05
5.4.340.3700.04019.05
5.4.320.4170.03719.00
5.4.310.4070.04719.05
5.4.300.3970.03319.04
5.4.290.4100.04019.00
5.4.280.3900.03019.16
5.4.270.3730.03719.09
5.4.260.3570.03719.21
5.4.250.3870.03319.04
5.4.240.3900.04019.04
5.4.230.3770.03719.06
5.4.220.4770.03319.26
5.4.210.3870.03019.23
5.4.200.3570.04019.26
5.4.190.4200.04318.99
5.4.180.4500.04018.97
5.4.170.3500.03019.04
5.4.160.2370.04019.07
5.4.150.2830.03019.14
5.4.140.3300.03716.23
5.4.130.3600.04016.38
5.4.120.3200.03716.23
5.4.110.3470.04716.14
5.4.100.3170.04016.36
5.4.90.2800.03316.46
5.4.80.2070.03316.45
5.4.70.2430.03716.32
5.4.60.2900.03016.33
5.4.50.3630.05016.36
5.4.40.3630.03716.47
5.4.30.3530.03316.47
5.4.20.3430.03716.40
5.4.10.3700.03716.44
5.4.00.4100.03315.88
5.3.290.4270.04014.60
5.3.280.3730.04314.57
5.3.270.4400.04714.53
5.3.260.0530.05014.42
5.3.250.2630.04014.43
5.3.240.2170.03314.55
5.3.230.3300.04014.52
5.3.220.1700.03314.60
5.3.210.2730.03314.50
5.3.200.2630.03314.37
5.3.190.2800.03314.53
5.3.180.2470.02714.55
5.3.170.2870.03314.67
5.3.160.3870.03314.54
5.3.150.4030.03714.47
5.3.140.3030.03314.39
5.3.130.3570.03714.50
5.3.120.3800.03714.65
5.3.110.3570.03014.52
5.3.100.3600.03713.88
5.3.90.3470.03713.99
5.3.80.3630.04014.04
5.3.70.3670.03013.96
5.3.60.3500.04014.10
5.3.50.3800.04013.77
5.3.40.3600.02713.89
5.3.30.3770.03713.84
5.3.20.3800.03313.64
5.3.10.3070.03713.75
5.3.00.4130.04313.56
5.2.170.3300.02311.08
5.2.160.3830.02711.07
5.2.150.3270.02711.14
5.2.140.3030.03311.02
5.2.130.3070.03010.98
5.2.120.3030.02311.04
5.2.110.3230.02711.09
5.2.100.3530.02710.98
5.2.90.2930.02711.00
5.2.80.0070.06011.04
5.2.70.0170.02711.08
5.2.60.0070.05010.94
5.2.50.2100.03010.84
5.2.40.2730.03010.86
5.2.30.2570.03310.84
5.2.20.2430.02310.93
5.2.10.2500.02310.89
5.2.00.2970.02710.76
5.1.60.2600.02310.01
5.1.50.2570.0339.90
5.1.40.2470.0239.84
5.1.30.2170.02710.39
5.1.20.2100.02710.40
5.1.10.2530.0279.98
5.1.00.2630.02710.22
5.0.50.1400.0238.46
5.0.40.1230.0208.43
5.0.30.1470.0308.24
5.0.20.1270.0178.34
5.0.10.1670.0208.07
5.0.00.1430.0308.20
4.4.90.0030.0376.33
4.4.80.0000.0376.33
4.4.70.1470.0176.33
4.4.60.1230.0106.33
4.4.50.1200.0136.33
4.4.40.1430.0306.33
4.4.30.1330.0176.33
4.4.20.1230.0176.33
4.4.10.1170.0176.33
4.4.00.1200.0276.33
4.3.110.1230.0136.33
4.3.100.1230.0136.33
4.3.90.1300.0176.33
4.3.80.1600.0306.33
4.3.70.1300.0176.33
4.3.60.1370.0136.33
4.3.50.1500.0106.33
4.3.40.1500.0236.33
4.3.30.0470.0136.33
4.3.20.0000.0176.33
4.3.10.0000.0176.33
4.3.00.0030.0336.33

preferences:
42.49 ms | 401 KiB | 5 Q