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]+,#g'; // 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.0120.00318.55
8.3.50.0070.00716.13
8.3.40.0040.01118.75
8.3.30.0090.00618.84
8.3.20.0050.00320.13
8.3.10.0080.00023.65
8.3.00.0040.00419.53
8.2.180.0070.01418.28
8.2.170.0150.00022.96
8.2.160.0070.00719.13
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00019.21
8.2.120.0040.00426.35
8.2.110.0110.00019.39
8.2.100.0110.00017.84
8.2.90.0030.00519.22
8.2.80.0000.00818.05
8.2.70.0080.00017.63
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0000.00720.55
8.2.30.0030.00519.16
8.2.20.0000.00717.99
8.2.10.0040.00418.00
8.2.00.0050.00318.12
8.1.280.0100.01025.92
8.1.270.0040.00422.06
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0050.00519.13
8.1.230.0040.00719.48
8.1.220.0050.00517.79
8.1.210.0040.00418.77
8.1.200.0060.00617.35
8.1.190.0050.00317.10
8.1.180.0070.00018.10
8.1.170.0000.00818.59
8.1.160.0030.00518.87
8.1.150.0000.00718.74
8.1.140.0030.00519.51
8.1.130.0000.00718.68
8.1.120.0000.00717.39
8.1.110.0080.00017.36
8.1.100.0070.00017.38
8.1.90.0040.00417.36
8.1.80.0050.00317.38
8.1.70.0020.00517.32
8.1.60.0000.00817.51
8.1.50.0080.00017.34
8.1.40.0060.00617.48
8.1.30.0080.00017.55
8.1.20.0000.00717.58
8.1.10.0000.00717.45
8.1.00.0000.00717.41
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0030.00317.32
8.0.260.0080.00016.92
8.0.250.0000.00716.93
8.0.240.0070.00016.95
8.0.230.0030.00316.88
8.0.220.0040.00416.88
8.0.210.0060.00316.93
8.0.200.0030.00316.94
8.0.190.0080.00016.84
8.0.180.0000.00716.95
8.0.170.0030.00516.83
8.0.160.0000.00716.76
8.0.150.0000.00716.72
8.0.140.0030.00516.83
8.0.130.0000.00513.35
8.0.120.0040.00416.80
8.0.110.0030.00516.79
8.0.100.0070.00016.78
8.0.90.0070.00016.88
8.0.80.0150.00816.88
8.0.70.0040.00416.76
8.0.60.0040.00416.77
8.0.50.0020.00516.74
8.0.30.0130.00517.27
8.0.20.0110.00817.40
8.0.10.0000.00716.84
8.0.00.0110.00616.54
7.4.330.0000.00515.55
7.4.320.0030.00316.45
7.4.300.0030.00316.53
7.4.290.0030.00916.45
7.4.280.0030.00516.43
7.4.270.0000.00616.30
7.4.260.0040.00416.34
7.4.250.0050.00216.36
7.4.240.0050.00416.34
7.4.230.0030.00316.51
7.4.220.0090.01416.51
7.4.210.0100.00316.34
7.4.200.0070.00016.42
7.4.160.0080.00816.51
7.4.150.0090.01817.40
7.4.140.0090.01017.86
7.4.130.0110.00816.55
7.4.120.0090.01316.44
7.4.110.0100.00616.59
7.4.100.0100.00716.46
7.4.90.0060.01116.63
7.4.80.0210.00019.39
7.4.70.0070.01016.49
7.4.60.0030.01316.47
7.4.50.0100.00716.22
7.4.40.0120.00316.26
7.4.30.0000.01716.50
7.4.00.0070.00914.94
7.3.330.0020.00213.23
7.3.320.0070.00012.98
7.3.310.0050.00216.21
7.3.300.0000.00716.16
7.3.290.0060.01016.25
7.3.280.0090.00816.24
7.3.270.0090.01617.40
7.3.260.0120.01016.46
7.3.250.0150.00716.33
7.3.240.0070.01416.36
7.3.230.0130.01016.31
7.3.210.0100.00716.34
7.3.200.0090.00916.48
7.3.190.0150.00616.41
7.3.180.0150.00016.14
7.3.170.0090.00616.34
7.3.160.0060.00916.29
7.3.120.0090.00614.70
7.3.110.0160.00314.80
7.3.100.0060.01014.56
7.3.90.0090.00914.73
7.3.80.0090.00614.84
7.3.70.0000.01214.86
7.3.60.0000.01214.60
7.3.50.0060.00614.50
7.3.40.0100.00714.61
7.3.30.0100.00714.75
7.3.20.0090.00616.57
7.3.10.0050.00516.56
7.3.00.0040.00816.60
7.2.330.0120.00616.67
7.2.320.0030.01916.72
7.2.310.0100.00716.47
7.2.300.0080.00816.48
7.2.290.0070.01016.25
7.2.250.0110.00415.18
7.2.240.0100.00615.07
7.2.230.0070.01114.82
7.2.220.0040.00814.82
7.2.210.0070.00714.61
7.2.200.0030.00715.16
7.2.190.0060.00614.98
7.2.180.0150.00014.89
7.2.170.0060.00914.73
7.2.60.0040.00816.77
7.2.00.0090.00619.15
7.1.330.0000.01315.79
7.1.320.0040.01115.89
7.1.310.0120.00615.63
7.1.300.0040.01115.79
7.1.290.0060.00315.60
7.1.280.0040.01115.80
7.1.270.0090.00315.78
7.1.260.0000.01215.71
7.1.200.0080.00815.87
7.1.100.0030.00918.04
7.1.70.0100.01217.22
7.1.60.0370.01634.98
7.1.50.0320.01734.50
7.1.40.0380.02034.38
7.1.30.0370.01734.65
7.1.20.0380.01534.46
7.1.10.0140.01216.64
7.1.00.0090.01316.55
7.0.200.0150.00816.74
7.0.190.0110.01116.56
7.0.180.0080.01616.00
7.0.170.0140.00916.26
7.0.160.0100.01316.24
7.0.150.0100.01616.25
7.0.140.0120.01216.25
7.0.130.0210.02016.52
7.0.120.0160.01016.43
7.0.110.0090.01216.29
7.0.100.0220.00116.03
7.0.90.0060.01516.20
7.0.80.0090.01216.39
7.0.70.0130.00716.14
7.0.60.0100.00716.11
7.0.50.0070.01516.41
7.0.40.0120.01116.64
7.0.30.0100.01216.64
7.0.20.0140.00816.30
7.0.10.0100.01316.18
7.0.00.0000.01916.46

preferences:
55.86 ms | 401 KiB | 5 Q