3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Maybe put this in a filter class? function removeQuotedValues($string) { $pattern = '#`.+`#'; // 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 return $string; } $string = '(`anurag`, 1,2), (1,2,3, `dm0c60544`),(2 ,3 ,3) '; echo removeQuotedValues($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.0090.00618.43
8.3.50.0180.00016.66
8.3.40.0070.01018.84
8.3.30.0110.00318.84
8.3.20.0040.00420.13
8.3.10.0060.00323.69
8.3.00.0030.00619.53
8.2.180.0090.00616.63
8.2.170.0130.00622.96
8.2.160.0060.00918.94
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00419.21
8.2.120.0000.00726.35
8.2.110.0090.00021.95
8.2.100.0080.00418.03
8.2.90.0040.00417.97
8.2.80.0100.00019.41
8.2.70.0060.00317.72
8.2.60.0030.00517.93
8.2.50.0040.00418.10
8.2.40.0000.00820.26
8.2.30.0040.00419.30
8.2.20.0040.00418.12
8.2.10.0040.00418.20
8.2.00.0070.00018.08
8.1.280.0120.00325.92
8.1.270.0070.00022.09
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00422.25
8.1.230.0080.00320.87
8.1.220.0040.00417.79
8.1.210.0050.00318.91
8.1.200.0070.00317.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0080.00018.63
8.1.160.0000.00718.99
8.1.150.0020.00520.63
8.1.140.0000.00719.46
8.1.130.0070.00018.98
8.1.120.0040.00417.48
8.1.110.0030.00617.52
8.1.100.0040.00417.52
8.1.90.0040.00417.54
8.1.80.0040.00417.56
8.1.70.0070.00417.45
8.1.60.0030.00517.74
8.1.50.0040.00417.66
8.1.40.0050.00517.65
8.1.30.0050.00217.71
8.1.20.0040.00417.71
8.1.10.0000.00917.57
8.1.00.0040.00417.47
8.0.300.0050.00319.90
8.0.290.0040.00416.88
8.0.280.0070.00018.39
8.0.270.0030.00317.29
8.0.260.0000.00816.96
8.0.250.0000.00717.14
8.0.240.0070.00017.02
8.0.230.0050.00316.98
8.0.220.0040.00416.89
8.0.210.0040.00416.88
8.0.200.0060.00016.93
8.0.190.0040.00417.00
8.0.180.0040.00417.05
8.0.170.0050.00317.07
8.0.160.0070.00016.88
8.0.150.0030.00516.99
8.0.140.0000.00716.84
8.0.130.0060.00013.37
8.0.120.0080.00016.98
8.0.110.0050.00316.98
8.0.100.0040.00416.95
8.0.90.0000.00816.84
8.0.80.0000.02017.01
8.0.70.0040.00416.85
8.0.60.0040.00417.07
8.0.50.0040.00416.98
8.0.30.0070.01117.07
8.0.20.0080.01217.43
8.0.10.0050.00317.15
8.0.00.0120.00617.06
7.4.330.0030.00315.55
7.4.320.0000.00616.62
7.4.300.0030.00316.72
7.4.290.0060.00316.78
7.4.280.0000.00816.82
7.4.270.0000.00916.88
7.4.260.0060.00316.80
7.4.250.0040.00416.71
7.4.240.0040.00416.84
7.4.230.0000.00816.83
7.4.220.0130.00616.78
7.4.210.0060.01016.73
7.4.200.0040.00416.48
7.4.160.0070.00816.62
7.4.150.0100.00917.40
7.4.140.0060.01517.86
7.4.130.0060.01216.47
7.4.120.0100.00916.63
7.4.110.0090.00916.66
7.4.100.0110.01716.71
7.4.90.0060.01116.71
7.4.80.0150.00619.39
7.4.70.0030.01316.64
7.4.60.0100.00616.53
7.4.50.0060.00916.77
7.4.40.0090.01216.55
7.4.30.0130.00616.63
7.4.00.0070.00915.21
7.3.330.0000.00613.31
7.3.320.0050.00013.25
7.3.310.0000.00716.45
7.3.300.0040.00416.39
7.3.290.0070.00716.41
7.3.280.0100.00716.37
7.3.270.0140.00317.40
7.3.260.0130.00616.55
7.3.250.0110.00816.59
7.3.240.0100.00716.51
7.3.230.0070.01316.31
7.3.210.0120.00616.73
7.3.200.0130.00616.39
7.3.190.0080.01216.65
7.3.180.0170.00016.43
7.3.170.0000.01616.65
7.3.160.0100.00616.46
7.3.120.0090.00614.58
7.3.110.0070.00914.61
7.3.100.0100.00714.85
7.3.90.0130.00714.97
7.3.80.0020.01514.89
7.3.70.0030.01014.82
7.3.60.0050.00614.99
7.3.50.0080.00514.81
7.3.40.0060.00814.91
7.3.30.0110.00614.71
7.3.20.0080.00816.70
7.3.10.0150.01016.51
7.3.00.0200.00616.53
7.2.330.0030.01316.81
7.2.320.0090.00916.88
7.2.310.0100.00716.69
7.2.300.0080.00916.92
7.2.290.0000.01616.72
7.2.250.0000.01515.40
7.2.240.0080.01115.08
7.2.230.0060.01115.20
7.2.220.0070.00715.06
7.2.210.0080.00815.03
7.2.200.0070.00915.16
7.2.190.0050.00814.95
7.2.180.0050.01115.07
7.2.170.0030.01115.02
7.2.160.0030.01315.01
7.2.150.0140.00417.15
7.2.140.0110.00716.92
7.2.130.0200.00616.64
7.2.120.0210.00316.93
7.2.110.0110.00816.84
7.2.100.0120.00716.86
7.2.90.0200.00516.96
7.2.80.0120.01116.83
7.2.70.0120.01116.72
7.2.60.0050.01217.00
7.2.50.0100.00816.80
7.2.40.0180.00416.90
7.2.30.0080.01016.93
7.2.20.0090.00916.81
7.2.10.0130.00716.78
7.2.00.0070.00817.91
7.1.330.0110.00615.89
7.1.320.0050.00815.82
7.1.310.0080.00615.83
7.1.300.0100.00515.80
7.1.290.0030.01115.87
7.1.280.0050.01115.89
7.1.270.0040.01215.85
7.1.260.0060.01015.87
7.1.250.0150.00715.66
7.1.200.0090.00615.75
7.1.100.0090.00618.44
7.1.70.0070.01517.41
7.1.60.0260.01035.03
7.1.50.0250.01234.86
7.1.40.0270.01034.69
7.1.30.0310.01634.74
7.1.20.0250.01434.70
7.1.10.0110.01116.70
7.1.00.0150.01117.07
7.0.200.0120.00616.70
7.0.190.0110.01216.87
7.0.180.0140.00616.41
7.0.170.0150.00516.59
7.0.160.0030.01816.25
7.0.150.0130.01016.27
7.0.140.0110.01216.54
7.0.130.0060.01916.61
7.0.120.0100.01516.61
7.0.110.0140.00916.36
7.0.100.0070.01316.16
7.0.90.0110.01216.59
7.0.80.0090.01316.68
7.0.70.0140.00716.61
7.0.60.0040.01516.34
7.0.50.0100.01116.42
7.0.40.0060.01016.66
7.0.30.0090.00816.75
7.0.20.0070.01016.56
7.0.10.0050.01116.49
7.0.00.0100.01016.57

preferences:
50.67 ms | 401 KiB | 5 Q