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 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.40.0070.00718.83
8.3.30.0090.00618.78
8.3.20.0080.00020.34
8.3.10.0040.00421.84
8.3.00.0040.00419.56
8.2.170.0110.00319.04
8.2.160.0120.00622.96
8.2.150.0000.01524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00021.04
8.2.110.0050.00522.16
8.2.100.0090.00317.97
8.2.90.0040.00418.03
8.2.80.0040.00419.02
8.2.70.0080.00417.50
8.2.60.0040.00418.16
8.2.50.0000.00918.10
8.2.40.0000.00820.42
8.2.30.0040.00419.26
8.2.20.0000.00717.95
8.2.10.0000.00718.20
8.2.00.0040.00418.14
8.1.270.0050.00322.13
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00620.81
8.1.230.0070.00420.91
8.1.220.0000.00917.76
8.1.210.0050.00318.77
8.1.200.0060.00317.36
8.1.190.0050.00317.36
8.1.180.0000.00918.10
8.1.170.0030.00618.37
8.1.160.0050.00319.09
8.1.150.0020.00518.85
8.1.140.0020.00519.47
8.1.130.0040.00418.91
8.1.120.0040.00417.48
8.1.110.0050.00217.45
8.1.100.0020.00517.57
8.1.90.0000.00817.56
8.1.80.0000.00917.52
8.1.70.0080.00017.54
8.1.60.0080.00017.63
8.1.50.0030.00517.51
8.1.40.0000.01017.52
8.1.30.0070.00017.64
8.1.20.0080.00017.70
8.1.10.0040.00417.67
8.1.00.0000.00817.45
8.0.300.0030.00520.08
8.0.290.0000.00716.88
8.0.280.0070.00018.50
8.0.270.0000.00817.23
8.0.260.0030.00316.98
8.0.250.0030.00317.00
8.0.240.0000.00717.13
8.0.230.0030.00317.07
8.0.220.0000.00717.00
8.0.210.0000.00716.86
8.0.200.0000.00617.07
8.0.190.0030.00517.03
8.0.180.0000.00716.97
8.0.170.0000.00816.89
8.0.160.0000.00817.03
8.0.150.0000.00716.94
8.0.140.0070.00016.87
8.0.130.0070.00013.34
8.0.120.0030.00516.97
8.0.110.0070.00017.04
8.0.100.0030.00516.91
8.0.90.0000.00716.96
8.0.80.0130.00917.03
8.0.70.0100.00016.86
8.0.60.0040.00416.98
8.0.50.0000.00716.80
8.0.30.0100.00617.15
8.0.20.0130.00717.40
8.0.10.0000.00716.94
8.0.00.0100.00717.07
7.4.330.0020.00215.55
7.4.320.0070.00016.71
7.4.300.0000.00616.63
7.4.290.0100.00016.65
7.4.280.0040.00416.71
7.4.270.0070.00016.74
7.4.260.0030.00316.53
7.4.250.0000.00816.52
7.4.240.0040.00416.57
7.4.230.0050.00316.51
7.4.220.0060.01316.81
7.4.210.0150.00416.78
7.4.200.0070.00016.71
7.4.160.0080.00816.51
7.4.150.0120.00617.40
7.4.140.0120.00617.86
7.4.130.0130.00916.68
7.4.120.0110.01116.57
7.4.110.0140.00316.68
7.4.100.0110.01616.83
7.4.90.0110.00616.55
7.4.80.0090.00919.39
7.4.70.0120.00316.56
7.4.60.0130.00316.56
7.4.50.0030.01316.71
7.4.40.0120.00416.73
7.4.30.0140.00716.46
7.4.00.0060.01015.17
7.3.330.0020.00213.15
7.3.320.0060.00313.25
7.3.310.0040.00416.50
7.3.300.0000.00716.35
7.3.290.0060.00816.32
7.3.280.0080.01016.32
7.3.270.0120.00617.40
7.3.260.0100.00816.52
7.3.250.0080.01016.59
7.3.240.0110.00816.43
7.3.230.0060.01316.25
7.3.210.0080.01116.49
7.3.200.0190.00316.53
7.3.190.0100.00716.38
7.3.180.0130.00316.57
7.3.170.0140.00416.38
7.3.160.0030.01416.42
7.3.120.0080.00814.81
7.3.110.0030.01414.88
7.3.100.0080.00714.85
7.3.90.0070.00914.76
7.3.80.0050.01015.07
7.3.70.0030.00914.97
7.3.60.0020.00914.70
7.3.50.0030.00814.84
7.3.40.0050.01014.72
7.3.30.0050.00414.84
7.3.20.0030.00916.73
7.3.10.0040.01016.65
7.3.00.0020.01116.76
7.2.330.0040.01416.85
7.2.320.0120.01216.52
7.2.310.0080.00816.67
7.2.300.0080.00816.70
7.2.290.0130.00616.65
7.2.250.0050.01215.11
7.2.240.0030.01615.25
7.2.230.0080.00815.13
7.2.220.0080.00715.09
7.2.210.0030.00915.22
7.2.200.0060.00715.17
7.2.190.0010.01115.11
7.2.180.0050.00515.14
7.2.170.0080.00515.02
7.2.60.0070.01016.97
7.2.00.0040.01119.41
7.1.330.0090.00516.00
7.1.320.0090.00316.09
7.1.310.0050.00816.12
7.1.300.0070.00716.05
7.1.290.0030.01215.99
7.1.280.0050.01015.81
7.1.270.0030.01215.91
7.1.260.0020.01216.06
7.1.200.0180.00715.88
7.1.100.0000.01017.91
7.1.70.0090.00917.26
7.1.60.0220.01935.38
7.1.50.0280.01635.11
7.1.40.0200.01634.68
7.1.30.0240.01234.75
7.1.20.0300.00934.83
7.1.10.0080.01416.96
7.1.00.0080.01116.86
7.0.200.0160.00316.93
7.0.190.0130.01116.88
7.0.180.0080.01216.35
7.0.170.0090.00916.32
7.0.160.0160.00616.48
7.0.150.0150.00616.32
7.0.140.0080.01216.45
7.0.130.0160.00616.79
7.0.120.0050.01316.64
7.0.110.0090.00916.44
7.0.100.0070.01216.34
7.0.90.0120.00916.47
7.0.80.0110.01016.57
7.0.70.0060.00916.35
7.0.60.0030.01716.40
7.0.50.0070.01416.45
7.0.40.0110.00416.44
7.0.30.0120.00916.71
7.0.20.0110.00916.53
7.0.10.0030.01616.66
7.0.00.0040.01616.60

preferences:
47.43 ms | 400 KiB | 5 Q