3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '(`anurag`, 1,2), (1,2,3, `dm0c60544`),(2 ,3 ,3) '; $pattern = '#`[a-zA-Z0-9]+`#'; // our regex pattern $string = preg_replace($pattern, '', $string); //replace backticked text and the following comma $string = str_replace(' ', '', $string); // remove unwanted whitespace $string = str_replace('(,', '(', $string); // remove unwanted comma $string = str_replace(',)', ')', $string); // remove unwanted comma $string = str_replace(',,', ',', $string); // remove unwanted comma echo $string;

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.0110.00318.68
8.3.50.0040.01116.30
8.3.40.0110.00418.95
8.3.30.0090.00618.96
8.3.20.0030.00520.29
8.3.10.0000.00821.87
8.3.00.0080.00019.68
8.2.180.0150.00318.30
8.2.170.0090.00622.96
8.2.160.0000.01419.09
8.2.150.0130.00624.18
8.2.140.0040.00424.66
8.2.130.0000.00719.31
8.2.120.0000.00726.35
8.2.110.0040.00419.34
8.2.100.0000.01118.03
8.2.90.0040.00418.34
8.2.80.0070.00317.97
8.2.70.0050.00317.93
8.2.60.0060.00318.00
8.2.50.0040.00418.10
8.2.40.0050.00320.17
8.2.30.0040.00419.34
8.2.20.0070.00018.08
8.2.10.0050.00218.24
8.2.00.0000.00818.02
8.1.280.0140.00725.92
8.1.270.0000.00822.19
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0100.00022.18
8.1.230.0090.00322.77
8.1.220.0040.00417.79
8.1.210.0060.00318.77
8.1.200.0090.00017.23
8.1.190.0040.00417.36
8.1.180.0080.00018.10
8.1.170.0030.00518.71
8.1.160.0070.00019.04
8.1.150.0030.00618.85
8.1.140.0040.00419.61
8.1.130.0030.00318.85
8.1.120.0000.00717.58
8.1.110.0040.00417.51
8.1.100.0000.00817.46
8.1.90.0000.00817.45
8.1.80.0060.00317.54
8.1.70.0040.00417.46
8.1.60.0040.00417.72
8.1.50.0050.00317.65
8.1.40.0030.00817.60
8.1.30.0000.00817.64
8.1.20.0040.00417.63
8.1.10.0030.00517.56
8.1.00.0000.00817.63
8.0.300.0040.00419.80
8.0.290.0000.00816.88
8.0.280.0070.00018.48
8.0.270.0000.00816.89
8.0.260.0030.00316.96
8.0.250.0000.00717.04
8.0.240.0000.00717.09
8.0.230.0000.00717.05
8.0.220.0070.00016.85
8.0.210.0070.00017.01
8.0.200.0000.00716.93
8.0.190.0030.00617.02
8.0.180.0040.00416.85
8.0.170.0070.00016.96
8.0.160.0030.00516.97
8.0.150.0070.00017.02
8.0.140.0000.00716.99
8.0.130.0000.00613.37
8.0.120.0040.00417.01
8.0.110.0030.00516.95
8.0.100.0000.00816.86
8.0.90.0030.00617.04
8.0.80.0160.00417.04
8.0.70.0000.00816.90
8.0.60.0000.00716.77
8.0.50.0040.00416.88
8.0.30.0070.01117.09
8.0.20.0120.00817.43
8.0.10.0020.00517.16
8.0.00.0070.01716.92
7.4.330.0060.00015.55
7.4.320.0000.00816.67
7.4.300.0060.00016.74
7.4.290.0000.01116.75
7.4.280.0000.00816.66
7.4.270.0050.00316.66
7.4.260.0040.00416.63
7.4.250.0000.00816.67
7.4.240.0040.00416.55
7.4.230.0030.00316.66
7.4.220.0100.01616.84
7.4.210.0160.00316.84
7.4.200.0000.00716.86
7.4.150.0110.00717.40
7.4.140.0160.00217.86
7.4.130.0130.01016.42
7.4.120.0130.00816.55
7.4.110.0090.00916.79
7.4.100.0120.00616.72
7.4.90.0120.00616.61
7.4.80.0130.00319.39
7.4.70.0120.00416.48
7.4.60.0060.00916.56
7.4.50.0070.00716.50
7.4.40.0170.00016.55
7.4.30.0100.00616.78
7.4.00.0100.00614.73
7.3.330.0000.00513.25
7.3.320.0070.00013.23
7.3.310.0040.00416.21
7.3.300.0070.00016.38
7.3.290.0060.00716.32
7.3.280.0070.00916.36
7.3.270.0070.01017.40
7.3.260.0070.01016.62
7.3.250.0100.00716.54
7.3.240.0100.00716.45
7.3.230.0060.01616.55
7.3.210.0060.01016.39
7.3.200.0130.00316.34
7.3.190.0120.00616.87
7.3.180.0060.01016.82
7.3.170.0080.00816.54
7.3.160.0100.00616.35
7.3.10.0090.00316.71
7.3.00.0080.00816.79
7.2.330.0100.01416.72
7.2.320.0100.01316.71
7.2.310.0030.01316.74
7.2.300.0070.01016.56
7.2.290.0150.00416.73
7.2.130.0070.01016.66
7.2.120.0060.00617.01
7.2.110.0030.01016.89
7.2.100.0100.00316.95
7.2.90.0150.00316.84
7.2.80.0040.01117.07
7.2.70.0050.00516.68
7.2.60.0090.00616.96
7.2.50.0090.00317.13
7.2.40.0060.00316.85
7.2.30.0070.00417.08
7.2.20.0060.00617.02
7.2.10.0080.00416.74
7.2.00.0050.00818.45
7.1.250.0060.00615.61
7.1.200.0090.01416.09
7.1.100.0040.00818.21
7.1.70.0140.00717.44
7.1.60.0320.01535.09
7.1.50.0280.02334.90
7.1.40.0200.02034.61
7.1.30.0320.01234.65
7.1.20.0070.02534.73
7.1.10.0090.00916.69
7.1.00.0070.01416.68
7.0.200.0120.00916.60
7.0.190.0030.01816.85
7.0.180.0130.00916.50
7.0.170.0100.01016.38
7.0.160.0080.01016.30
7.0.150.0090.00916.32
7.0.140.0050.01716.48
7.0.130.0130.00916.57
7.0.120.0090.01216.56
7.0.110.0120.00316.46
7.0.100.0030.01316.52
7.0.90.0000.01616.42
7.0.80.0100.01316.54
7.0.70.0120.00816.37
7.0.60.0060.01316.30
7.0.50.0100.00716.45
7.0.40.0030.01516.72
7.0.30.0080.01116.60
7.0.20.0100.00716.51
7.0.10.0100.01116.75
7.0.00.0120.00916.63

preferences:
46.97 ms | 401 KiB | 5 Q