3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'bla bla bla http://google.com bla bla'; $fixedString = preg_replace_callback( '#[-a-zA-Z0-9@:%_\+.~\#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~\#?&//=]*)?#si', function($matches) { return 'http://exmaple.com/visit/' . base64_encode($matches[0]); }, $string ); var_dump($fixedString);

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.0080.00919.99
8.5.00.0110.01020.11
8.4.150.0010.00214.05
8.4.140.0130.00717.71
8.4.130.0070.00518.22
8.4.120.0130.00623.85
8.4.110.0100.01122.59
8.4.100.0120.00818.74
8.4.90.0100.00918.70
8.4.80.0140.00718.07
8.4.70.0110.00918.07
8.4.60.0060.00319.09
8.4.50.0040.00619.75
8.4.40.0170.00319.75
8.4.30.0060.01317.53
8.4.20.0100.01017.89
8.4.10.0160.00417.85
8.3.280.0110.00918.60
8.3.270.0130.00716.67
8.3.260.0110.00916.70
8.3.250.0110.00819.08
8.3.240.0100.00918.96
8.3.230.0080.00816.63
8.3.220.0050.00218.72
8.3.210.0110.00516.59
8.3.200.0060.00316.57
8.3.190.0080.00817.14
8.3.180.0090.00816.87
8.3.170.0040.01519.10
8.3.160.0130.00618.37
8.3.150.0110.00720.60
8.3.140.0090.00019.06
8.3.130.0090.00618.59
8.3.120.0130.00319.12
8.3.110.0090.00020.94
8.3.100.0040.00424.06
8.3.90.0060.00326.77
8.3.80.0030.00718.43
8.3.70.0100.01017.00
8.3.60.0160.00018.43
8.3.50.0120.00922.07
8.3.40.0070.00718.95
8.3.30.0060.00918.97
8.3.20.0080.00020.15
8.3.10.0040.00420.61
8.3.00.0030.00519.02
8.2.290.0100.00820.31
8.2.280.0070.00420.28
8.2.270.0100.01017.44
8.2.260.0120.00616.69
8.2.250.0050.00316.73
8.2.240.0040.01119.16
8.2.230.0100.00022.58
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0090.00018.43
8.2.190.0040.01116.75
8.2.180.0150.00325.92
8.2.170.0110.00719.08
8.2.160.0040.01120.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0030.00520.86
8.2.110.0000.01022.23
8.2.100.0090.00318.28
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0000.01317.88
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0000.00818.29
8.2.30.0000.00718.07
8.2.20.0040.00417.98
8.2.10.0030.00618.25
8.2.00.0040.00418.16
8.1.330.0100.00922.17
8.1.320.0120.00816.33
8.1.310.0090.00616.34
8.1.300.0060.00320.16
8.1.290.0030.00630.84
8.1.280.0140.00725.92
8.1.270.0050.00323.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00620.98
8.1.230.0050.00520.34
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0090.00017.35
8.1.180.0030.00518.10
8.1.170.0040.00418.88
8.1.160.0040.00418.80
8.1.150.0000.00718.93
8.1.140.0040.00419.62
8.1.130.0030.00317.68
8.1.120.0070.00017.53
8.1.110.0000.00717.59
8.1.100.0070.00017.52
8.1.90.0050.00217.66
8.1.80.0000.00817.66
8.1.70.0000.00817.50
8.1.60.0040.00417.75
8.1.50.0060.00317.64
8.1.40.0050.00317.67
8.1.30.0030.00517.71
8.1.20.0030.00617.84
8.1.10.0020.00517.77
8.1.00.0060.00317.62
8.0.300.0030.00519.08
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0000.00717.30
8.0.260.0030.00317.31
8.0.250.0020.00517.11
8.0.240.0040.00417.09
8.0.230.0030.00317.07
8.0.220.0040.00416.99
8.0.210.0070.00017.07
8.0.200.0000.00717.09
8.0.190.0050.00317.07
8.0.180.0040.00417.06
8.0.170.0000.00817.06
8.0.160.0070.00016.99
8.0.150.0050.00317.02
8.0.140.0060.00316.93
8.0.130.0030.00313.54
8.0.120.0040.00417.01
8.0.110.0060.00317.12
8.0.100.0030.00617.07
8.0.90.0040.00416.95
8.0.80.0040.01417.06
8.0.70.0040.00416.84
8.0.60.0000.00716.93
8.0.50.0050.00217.07
8.0.30.0090.00917.14
8.0.20.0120.00717.43
8.0.10.0040.00417.23
8.0.00.0120.00916.90
7.4.330.0020.00216.92
7.4.320.0000.00616.88
7.4.300.0060.00016.70
7.4.290.0030.00316.71
7.4.280.0000.00716.80
7.4.270.0040.00416.71
7.4.260.0000.00716.78
7.4.250.0000.00716.61
7.4.240.0000.00816.84
7.4.230.0030.00316.80
7.4.220.0030.01416.85
7.4.210.0040.01016.72
7.4.200.0070.00016.91
7.4.160.0050.01116.66
7.4.150.0070.01017.40
7.4.140.0130.01017.86
7.4.130.0120.00616.78
7.4.120.0070.01316.87
7.4.110.0160.00616.88
7.4.100.0140.00816.83
7.4.90.0180.00016.70
7.4.80.0130.00719.39
7.4.70.0100.00716.77
7.4.60.0070.01116.68
7.4.50.0120.00316.49
7.4.40.0030.01416.76
7.4.30.0080.00816.69
7.4.00.0100.00714.80
7.3.330.0000.00613.46
7.3.320.0000.00513.41
7.3.310.0030.00316.52
7.3.300.0000.00616.30
7.3.290.0070.00016.26
7.3.280.0090.00616.43
7.3.270.0060.01617.40
7.3.260.0170.00016.72
7.3.250.0100.00816.56
7.3.240.0070.01216.40
7.3.230.0100.01416.63
7.3.210.0140.00616.46
7.3.200.0050.01119.39
7.3.190.0140.00716.44
7.3.180.0120.00316.77
7.3.170.0110.00516.63
7.3.160.0140.00316.76
7.3.10.0110.00816.36
7.3.00.0090.00916.70
7.2.330.0070.01016.50
7.2.320.0030.01516.81
7.2.310.0160.00616.84
7.2.300.0080.00816.95
7.2.290.0140.00316.81
7.2.130.0110.00416.79
7.2.120.0150.01116.73
7.2.110.0130.00617.06
7.2.100.0030.01016.76
7.2.90.0200.00716.75
7.2.80.0150.00916.95
7.2.70.0000.01716.61
7.2.60.0110.00916.92
7.2.50.0250.00617.04
7.2.40.0160.00616.89
7.2.30.0040.01817.13
7.2.20.0150.00817.02
7.2.10.0290.00616.93
7.2.00.0100.01017.00
7.1.250.0110.00315.73
7.1.200.0040.00816.03
7.1.70.0030.01217.07
7.1.60.0060.01919.19
7.1.00.0030.07722.29
7.0.200.0000.00816.80
7.0.60.0230.04719.84
7.0.50.0000.09017.91
7.0.40.0030.09320.17
7.0.30.0370.08020.39
7.0.20.0170.04720.22
7.0.10.0030.07020.21
7.0.00.0030.08720.25
5.6.280.0000.07720.91
5.6.210.0070.03720.44
5.6.200.0100.03318.29
5.6.190.0070.07720.52
5.6.180.2700.04320.33
5.6.170.1270.05720.58
5.6.160.0030.07720.39
5.6.150.0030.08318.13
5.6.140.0030.06318.18
5.6.130.0070.06718.17
5.6.120.0070.08321.14
5.6.110.0070.08321.00
5.6.100.0230.07021.14
5.6.90.0030.08021.00
5.6.80.0100.07720.41
5.5.350.3700.03720.37
5.5.340.0070.05017.99
5.5.330.0030.07720.21
5.5.320.0000.05720.24
5.5.310.0270.05020.36
5.5.300.0100.07018.05
5.5.290.0070.04718.07
5.5.280.0170.05720.80
5.5.270.0070.05320.65
5.5.260.0070.08720.98
5.5.250.0130.06020.71
5.5.240.0270.06720.07

preferences:
172.19 ms | 403 KiB | 5 Q