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.0120.00318.43
8.3.50.0110.00716.57
8.3.40.0110.00418.96
8.3.30.0120.00318.79
8.3.20.0080.00020.34
8.3.10.0050.00523.65
8.3.00.0080.00019.56
8.2.180.0140.00716.50
8.2.170.0140.00722.96
8.2.160.0040.01118.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.14
8.2.120.0050.00326.35
8.2.110.0090.00020.35
8.2.100.0060.00617.83
8.2.90.0040.00419.28
8.2.80.0000.00817.97
8.2.70.0000.01117.75
8.2.60.0000.00818.04
8.2.50.0030.00518.10
8.2.40.0040.00420.61
8.2.30.0040.00419.40
8.2.20.0070.00018.16
8.2.10.0080.00018.07
8.2.00.0040.00418.15
8.1.280.0060.00925.92
8.1.270.0000.00723.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0050.00522.20
8.1.220.0030.00517.79
8.1.210.0000.00918.77
8.1.200.0070.00317.47
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0080.00018.73
8.1.160.0040.00419.05
8.1.150.0050.00320.66
8.1.140.0040.00419.46
8.1.130.0030.00318.85
8.1.120.0000.00717.44
8.1.110.0000.00817.48
8.1.100.0100.00017.60
8.1.90.0040.00417.46
8.1.80.0000.00717.41
8.1.70.0090.00017.46
8.1.60.0030.00617.76
8.1.50.0030.00517.73
8.1.40.0110.00017.53
8.1.30.0000.00817.82
8.1.20.0040.00417.84
8.1.10.0050.00217.57
8.1.00.0030.00617.66
8.0.300.0050.00218.77
8.0.290.0000.00816.88
8.0.280.0070.00018.40
8.0.270.0000.00717.39
8.0.260.0040.00416.91
8.0.250.0030.00317.02
8.0.240.0070.00017.13
8.0.230.0000.00717.02
8.0.220.0070.00017.09
8.0.210.0070.00017.06
8.0.200.0060.00017.14
8.0.190.0030.00517.11
8.0.180.0030.00517.10
8.0.170.0030.00317.09
8.0.160.0070.00017.03
8.0.150.0040.00416.95
8.0.140.0040.00417.07
8.0.130.0040.00413.48
8.0.120.0050.00317.02
8.0.110.0040.00417.11
8.0.100.0040.00417.00
8.0.90.0040.00416.92
8.0.80.0060.01616.95
8.0.70.0030.00517.01
8.0.60.0040.00416.96
8.0.50.0000.00816.87
8.0.30.0060.01117.20
8.0.20.0090.00917.40
8.0.10.0040.00416.98
8.0.00.0100.00716.73
7.4.330.0020.00215.55
7.4.320.0060.00016.67
7.4.300.0000.00616.80
7.4.290.0050.00316.74
7.4.280.0070.00016.72
7.4.270.0030.00516.80
7.4.260.0040.00416.73
7.4.250.0040.00416.80
7.4.240.0070.00016.82
7.4.230.0030.00316.91
7.4.220.0160.01016.77
7.4.210.0060.01016.86
7.4.200.0030.00316.55
7.4.160.0130.00616.54
7.4.150.0060.01217.40
7.4.140.0130.00517.86
7.4.130.0090.00916.62
7.4.120.0090.01116.79
7.4.110.0080.00816.75
7.4.100.0050.01416.64
7.4.90.0060.01216.70
7.4.80.0070.01019.39
7.4.70.0090.00616.63
7.4.60.0030.01416.75
7.4.50.0110.00416.64
7.4.40.0030.01316.76
7.4.30.0110.01116.84
7.4.00.0060.00615.32
7.3.330.0000.00613.40
7.3.320.0000.00613.45
7.3.310.0040.00416.50
7.3.300.0000.00716.41
7.3.290.0050.00916.46
7.3.280.0060.01016.45
7.3.270.0100.00717.40
7.3.260.0060.01516.43
7.3.250.0080.00916.57
7.3.240.0060.01016.72
7.3.230.0130.00416.49
7.3.210.0060.01016.77
7.3.200.0060.01116.52
7.3.190.0130.00316.54
7.3.180.0110.00516.51
7.3.170.0100.00616.52
7.3.160.0100.00716.52
7.2.330.0090.01216.89
7.2.320.0090.00916.82
7.2.310.0100.01016.91
7.2.300.0120.00916.78
7.2.290.0090.00916.88
7.2.60.0080.00816.86
7.2.00.0030.01019.63
7.1.200.0060.00616.07
7.1.100.0070.00718.15
7.1.70.0160.00317.20
7.1.60.0070.02735.35
7.1.50.0350.01134.71
7.1.40.0340.01034.57
7.1.30.0300.01334.75
7.1.20.0250.01434.73
7.1.10.0120.01216.87
7.1.00.0090.00916.96
7.0.200.0840.01116.66
7.0.190.0090.01216.84
7.0.180.0120.00816.35
7.0.170.0030.01616.36
7.0.160.0120.00616.33
7.0.150.0820.01516.50
7.0.140.0100.01016.51
7.0.130.0100.01016.53
7.0.120.0860.01314.90
7.0.110.0130.00716.75
7.0.100.0910.01316.39
7.0.90.0070.01316.42
7.0.80.0030.01616.46
7.0.70.0080.00816.36
7.0.60.0090.00616.38
7.0.50.0090.00916.37
7.0.40.0110.00816.60
7.0.30.0100.01016.56
7.0.20.0150.00616.54
7.0.10.0040.01916.64
7.0.00.0000.01816.72

preferences:
40.01 ms | 401 KiB | 5 Q