3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '(`anurag`, 1,2), (1,2,3), `dm0c60544`,(2 ,3 ,3) '; $pattern = '#[`a-zA-Z]+,#'; // our regex pattern $string = preg_replace($pattern, '', $string); //replace backticked text and the following comma $string = str_replace(' ', '', $string); // remove unwanted whitespace 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.0080.00818.56
8.3.50.0130.00316.33
8.3.40.0070.00718.96
8.3.30.0070.00718.80
8.3.20.0090.00020.12
8.3.10.0000.00823.70
8.3.00.0030.00519.55
8.2.180.0150.00318.29
8.2.170.0070.00722.96
8.2.160.0030.01019.25
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00821.05
8.2.120.0050.00326.35
8.2.110.0070.00321.05
8.2.100.0080.00417.78
8.2.90.0030.00619.19
8.2.80.0040.00417.97
8.2.70.0080.00017.88
8.2.60.0080.00017.93
8.2.50.0000.00818.10
8.2.40.0000.00720.60
8.2.30.0000.00719.18
8.2.20.0040.00418.02
8.2.10.0040.00418.10
8.2.00.0000.00718.03
8.1.280.0150.00625.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00619.34
8.1.230.0000.01219.21
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.50
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0000.00719.04
8.1.150.0040.00418.85
8.1.140.0040.00419.53
8.1.130.0030.00318.79
8.1.120.0020.00517.51
8.1.110.0050.00317.50
8.1.100.0040.00317.45
8.1.90.0000.00717.50
8.1.80.0000.00817.62
8.1.70.0070.00017.45
8.1.60.0030.00517.63
8.1.50.0030.00517.66
8.1.40.0030.01017.45
8.1.30.0090.00017.70
8.1.20.0020.00517.70
8.1.10.0060.00317.59
8.1.00.0050.00317.66
8.0.300.0000.00720.02
8.0.290.0060.00316.88
8.0.280.0050.00218.55
8.0.270.0000.00817.29
8.0.260.0030.00316.93
8.0.250.0000.00716.98
8.0.240.0000.00717.11
8.0.230.0030.00317.02
8.0.220.0030.00317.02
8.0.210.0070.00016.98
8.0.200.0000.00616.89
8.0.190.0040.00417.05
8.0.180.0050.00316.88
8.0.170.0080.00017.00
8.0.160.0030.00316.98
8.0.150.0040.00316.84
8.0.140.0000.00716.99
8.0.130.0000.00513.49
8.0.120.0080.00016.83
8.0.110.0040.00416.99
8.0.100.0040.00417.00
8.0.90.0050.00316.85
8.0.80.0140.00317.01
8.0.70.0030.00516.86
8.0.60.0000.00816.86
8.0.50.0070.00016.84
8.0.30.0080.01116.99
8.0.20.0100.01017.40
8.0.10.0000.00817.09
8.0.00.0070.01016.61
7.4.330.0000.00515.55
7.4.320.0030.00316.67
7.4.300.0070.00016.70
7.4.290.0000.01116.75
7.4.280.0030.00516.75
7.4.270.0070.00016.80
7.4.260.0040.00416.73
7.4.250.0000.00716.71
7.4.240.0000.00816.71
7.4.230.0050.00216.68
7.4.220.0140.01316.66
7.4.210.0060.00916.86
7.4.200.0030.00316.79
7.4.160.0070.01016.48
7.4.150.0100.01417.40
7.4.140.0120.00717.86
7.4.130.0170.00716.59
7.4.120.0090.00916.78
7.4.110.0120.00916.70
7.4.100.0100.01016.60
7.4.90.0090.00916.84
7.4.80.0130.00319.39
7.4.70.0090.00616.65
7.4.60.0060.01016.59
7.4.50.0040.01116.40
7.4.40.0110.00516.75
7.4.30.0140.00316.64
7.4.00.0070.01015.22
7.3.330.0000.00513.18
7.3.320.0000.00813.18
7.3.310.0070.00016.42
7.3.300.0070.00016.30
7.3.290.0060.00816.32
7.3.280.0070.01116.34
7.3.270.0110.00817.40
7.3.260.0100.00616.47
7.3.250.0130.01016.66
7.3.240.0120.00516.50
7.3.230.0150.00516.45
7.3.210.0170.00016.29
7.3.200.0100.01016.54
7.3.190.0110.00616.61
7.3.180.0060.01116.33
7.3.170.0090.00616.29
7.3.160.0060.00916.39
7.3.10.0100.00716.98
7.3.00.0060.00616.53
7.2.330.0100.01016.61
7.2.320.0130.00316.78
7.2.310.0060.00916.64
7.2.300.0000.01616.76
7.2.290.0100.00816.63
7.2.130.0030.01016.92
7.2.120.0110.00016.97
7.2.110.0080.00517.16
7.2.100.0090.00016.91
7.2.90.0100.00617.01
7.2.80.0090.00317.00
7.2.70.0100.00317.01
7.2.60.0080.00717.02
7.2.50.0030.00716.87
7.2.40.0040.01017.07
7.2.30.0090.00617.03
7.2.20.0040.00717.14
7.2.10.0030.01017.00
7.2.00.0020.01318.23
7.1.250.0070.00315.68
7.1.200.0030.00615.71
7.1.100.0060.00618.41
7.1.70.0120.01017.06
7.1.60.0260.02635.39
7.1.50.0390.01334.93
7.1.40.0230.02334.50
7.1.30.0220.02734.72
7.1.20.0260.01934.71
7.1.10.0100.01116.72
7.1.00.0130.00917.05
7.0.200.0040.01716.69
7.0.190.0110.00816.98
7.0.180.0090.01216.33
7.0.170.0060.01516.48
7.0.160.0150.00616.36
7.0.150.0100.01116.19
7.0.140.0080.01416.50
7.0.130.0030.01816.59
7.0.120.0190.01716.43
7.0.110.0070.01216.45
7.0.100.0060.01616.36
7.0.90.0110.01216.42
7.0.80.0070.01416.41
7.0.70.0030.01716.67
7.0.60.0130.00816.46
7.0.50.0010.01916.49
7.0.40.0160.00716.81
7.0.30.0060.01616.72
7.0.20.0060.01216.50
7.0.10.0110.00916.78
7.0.00.0080.01416.64

preferences:
48.16 ms | 400 KiB | 5 Q