3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Maybe put this in a filter class? function removeQuotedValues($string) { $pattern = '#`[a-zA-Z0-9]`#'; // our regex pattern $string = preg_replace($pattern, '', $string); //remove `backtickedStrings` echo $string ."\n"; $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.55
8.3.50.0070.01116.66
8.3.40.0070.00718.91
8.3.30.0000.01418.72
8.3.20.0070.00020.29
8.3.10.0050.00323.66
8.3.00.0030.00519.66
8.2.180.0060.01616.63
8.2.170.0120.00322.96
8.2.160.0190.00019.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0060.00319.44
8.2.120.0040.00426.16
8.2.110.0100.00022.18
8.2.100.0080.00417.84
8.2.90.0050.00518.08
8.2.80.0000.00817.97
8.2.70.0060.00617.75
8.2.60.0040.00417.80
8.2.50.0000.00818.10
8.2.40.0070.00020.29
8.2.30.0030.00519.29
8.2.20.0000.00818.05
8.2.10.0000.00918.14
8.2.00.0020.00518.02
8.1.280.0140.00025.92
8.1.270.0080.00023.99
8.1.260.0090.00626.35
8.1.250.0000.00728.09
8.1.240.0040.01422.05
8.1.230.0040.00821.03
8.1.220.0040.00417.74
8.1.210.0080.00018.88
8.1.200.0030.00717.47
8.1.190.0000.00817.35
8.1.180.0000.00918.10
8.1.170.0000.00918.63
8.1.160.0000.00719.05
8.1.150.0040.00420.62
8.1.140.0040.00419.60
8.1.130.0000.00717.43
8.1.120.0080.00017.48
8.1.110.0040.00417.48
8.1.100.0090.00317.43
8.1.90.0040.00417.45
8.1.80.0000.00717.45
8.1.70.0030.00617.45
8.1.60.0030.00517.67
8.1.50.0030.00617.64
8.1.40.0060.00617.64
8.1.30.0030.00617.76
8.1.20.0000.00817.83
8.1.10.0060.00317.57
8.1.00.0000.00917.46
8.0.300.0000.00719.98
8.0.290.0040.00416.88
8.0.280.0000.00718.43
8.0.270.0030.00618.77
8.0.260.0030.00316.98
8.0.250.0030.00317.01
8.0.240.0020.00517.00
8.0.230.0030.00317.16
8.0.220.0070.00017.03
8.0.210.0000.00716.95
8.0.200.0030.00316.98
8.0.190.0000.00817.13
8.0.180.0050.00217.10
8.0.170.0020.00516.96
8.0.160.0040.00416.96
8.0.150.0030.00316.93
8.0.140.0040.00416.95
8.0.130.0000.00613.52
8.0.120.0040.00416.90
8.0.110.0000.00717.01
8.0.100.0030.00516.88
8.0.90.0040.00416.94
8.0.80.0130.01017.00
8.0.70.0000.00716.88
8.0.60.0040.00416.89
8.0.50.0040.00416.97
8.0.30.0070.00917.43
8.0.20.0150.00517.42
8.0.10.0040.00417.05
8.0.00.0070.01016.73
7.4.330.0020.00215.55
7.4.320.0030.00316.72
7.4.300.0000.00716.85
7.4.290.0040.00416.87
7.4.280.0040.00416.80
7.4.270.0000.00716.74
7.4.260.0030.00716.67
7.4.250.0020.00516.56
7.4.240.0050.00316.85
7.4.230.0000.00716.73
7.4.220.0030.02416.86
7.4.210.0120.00316.60
7.4.200.0050.00216.73
7.4.160.0100.00616.82
7.4.150.0140.00517.40
7.4.140.0110.00717.86
7.4.130.0130.00716.63
7.4.120.0080.01016.71
7.4.110.0060.00916.79
7.4.100.0110.00716.70
7.4.90.0090.00916.81
7.4.80.0040.01719.39
7.4.70.0060.01016.73
7.4.60.0090.00916.80
7.4.50.0090.00616.55
7.4.40.0100.00716.75
7.4.30.0070.01016.74
7.4.00.0100.00015.20
7.3.330.0020.00213.32
7.3.320.0000.00613.23
7.3.310.0070.00016.32
7.3.300.0030.00316.41
7.3.290.0090.00716.42
7.3.280.0090.00616.46
7.3.270.0120.01217.40
7.3.260.0150.00616.61
7.3.250.0120.00716.57
7.3.240.0100.00716.62
7.3.230.0100.00716.60
7.3.210.0120.00616.51
7.3.200.0060.01316.82
7.3.190.0070.01216.46
7.3.180.0080.00816.54
7.3.170.0060.00916.59
7.3.160.0030.01316.48
7.3.00.0250.00616.71
7.2.330.0090.00916.83
7.2.320.0110.01116.91
7.2.310.0100.00716.60
7.2.300.0100.00716.74
7.2.290.0030.01316.92
7.2.130.0120.00816.93
7.2.120.0290.00317.06
7.2.110.0270.00716.99
7.2.100.0250.00416.72
7.2.90.0190.01316.91
7.2.80.0150.01116.84
7.2.70.0140.00316.95
7.2.60.0020.01417.08
7.2.50.0050.01317.05
7.2.40.0160.00317.04
7.2.30.0150.01516.84
7.2.20.0150.01217.15
7.2.10.0150.00716.70
7.2.00.0190.00617.00
7.1.250.0090.00915.84
7.1.240.0120.01215.95
7.1.230.0170.00315.68
7.1.220.0050.00816.08
7.1.210.0140.00015.65
7.1.200.0140.00315.88
7.1.190.0110.00615.85
7.1.180.0150.01215.85
7.1.170.0120.00915.49
7.1.160.0090.00915.53
7.1.150.0050.00915.76
7.1.140.0150.00315.87
7.1.130.0170.00715.57
7.1.120.0070.01015.57
7.1.110.0130.00415.56
7.1.100.0140.00415.88
7.1.90.0030.00615.62
7.1.80.0070.00315.79
7.1.70.0050.00816.63
7.1.60.0240.01225.55
7.1.50.0220.01325.39
7.1.40.0180.01125.20
7.1.30.0140.01525.30
7.1.20.0140.01925.21
7.1.10.0040.01316.11
7.1.00.0070.01216.35
7.0.330.0100.01015.57
7.0.320.0120.01215.61
7.0.310.0200.00315.53
7.0.300.0050.01015.43
7.0.290.0080.00815.78
7.0.280.0140.00315.48
7.0.270.0090.00515.66
7.0.260.0190.00615.05
7.0.250.0160.00615.62
7.0.240.0080.00515.61
7.0.230.0030.00615.43
7.0.220.0050.00515.66
7.0.210.0090.00415.53
7.0.200.0110.00816.38
7.0.190.0060.00915.97
7.0.180.0120.00315.93
7.0.170.0100.01116.01
7.0.160.0120.00616.09
7.0.150.0120.00815.88
7.0.140.0100.00615.83
7.0.130.0100.00716.24
7.0.120.0130.00616.08
7.0.110.0050.01115.92
7.0.100.0380.00714.92
7.0.90.0430.00814.99
7.0.80.0080.01115.94
7.0.70.0100.00915.97
7.0.60.0210.00615.84
7.0.50.0080.01216.01
7.0.40.0100.00815.14
7.0.30.0140.00915.06
7.0.20.0140.00915.21
7.0.10.0410.01014.08
7.0.00.0310.00814.09
5.6.380.0150.00414.33

preferences:
42.29 ms | 400 KiB | 5 Q