3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Maybe put this in a filter class? function removeQuotedValues($string) { $pattern = '#`\W+`#'; // 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.0140.00716.55
8.3.40.0150.00018.74
8.3.30.0150.00018.84
8.3.20.0080.00020.38
8.3.10.0050.00323.53
8.3.00.0040.00419.54
8.2.180.0120.00616.75
8.2.170.0160.00322.96
8.2.160.0110.00419.29
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.01420.80
8.2.110.0030.00722.02
8.2.100.0070.00717.83
8.2.90.0030.00519.22
8.2.80.0000.00818.04
8.2.70.0030.00517.63
8.2.60.0000.00917.93
8.2.50.0000.00818.10
8.2.40.0060.00320.57
8.2.30.0030.00619.23
8.2.20.0000.00718.23
8.2.10.0070.00018.22
8.2.00.0040.00418.21
8.1.280.0120.00625.92
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00422.53
8.1.230.0040.00819.12
8.1.220.0080.00017.79
8.1.210.0030.00518.77
8.1.200.0030.00717.35
8.1.190.0030.00617.36
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0040.00418.97
8.1.150.0050.00320.58
8.1.140.0090.00019.56
8.1.130.0000.00718.87
8.1.120.0000.00717.49
8.1.110.0040.00417.58
8.1.100.0040.00417.47
8.1.90.0000.00717.59
8.1.80.0040.00417.47
8.1.70.0000.00917.46
8.1.60.0040.00417.74
8.1.50.0070.00017.69
8.1.40.0040.00717.64
8.1.30.0000.00717.87
8.1.20.0040.00417.86
8.1.10.0040.00417.56
8.1.00.0040.00417.47
8.0.300.0000.00720.00
8.0.290.0070.00017.00
8.0.280.0030.00318.42
8.0.270.0000.00717.20
8.0.260.0000.01016.97
8.0.250.0070.00017.16
8.0.240.0000.00717.01
8.0.230.0070.00017.13
8.0.220.0000.00717.06
8.0.210.0030.00317.03
8.0.200.0080.00016.98
8.0.190.0000.00817.16
8.0.180.0000.00817.04
8.0.170.0000.00717.07
8.0.160.0000.00716.97
8.0.150.0000.00716.95
8.0.140.0050.00217.04
8.0.130.0060.00013.55
8.0.120.0040.00417.05
8.0.110.0030.00317.07
8.0.100.0050.00316.99
8.0.90.0040.00417.12
8.0.80.0060.01016.94
8.0.70.0040.00417.07
8.0.60.0040.00417.05
8.0.50.0070.00016.92
8.0.30.0100.00817.18
8.0.20.0120.00817.40
8.0.10.0040.00417.11
8.0.00.0060.01216.73
7.4.330.0000.00615.55
7.4.320.0000.00616.73
7.4.300.0040.00416.75
7.4.290.0000.00716.81
7.4.280.0080.00016.82
7.4.270.0000.00716.67
7.4.260.0000.00716.74
7.4.250.0050.00316.70
7.4.240.0020.00516.75
7.4.230.0070.00016.89
7.4.220.0060.01216.79
7.4.210.0030.01216.84
7.4.200.0030.00316.75
7.4.160.0090.00616.82
7.4.150.0040.01417.40
7.4.140.0090.00917.86
7.4.130.0150.00716.69
7.4.120.0060.01616.73
7.4.110.0040.01116.66
7.4.100.0120.01216.70
7.4.90.0030.01316.76
7.4.80.0070.01019.39
7.4.70.0100.00616.80
7.4.60.0100.00716.80
7.4.50.0030.01216.71
7.4.40.0100.00716.68
7.4.30.0060.00916.79
7.4.10.0060.01114.89
7.4.00.0070.00815.12
7.3.330.0020.00213.43
7.3.320.0050.00013.31
7.3.310.0000.00716.47
7.3.300.0040.00416.48
7.3.290.0080.00916.44
7.3.280.0080.00916.46
7.3.270.0000.01817.40
7.3.260.0130.00516.52
7.3.250.0080.00916.52
7.3.240.0110.00816.80
7.3.230.0070.01616.43
7.3.210.0180.00016.48
7.3.200.0070.01016.52
7.3.190.0100.01316.50
7.3.180.0130.00316.61
7.3.170.0090.00616.46
7.3.160.0100.00616.71
7.3.130.0090.00815.06
7.3.120.0070.01015.06
7.3.110.0040.01215.06
7.3.100.0070.00814.94
7.3.90.0080.00815.12
7.3.80.0040.00915.01
7.3.70.0070.00614.90
7.3.60.0030.01314.93
7.3.50.0050.00914.96
7.3.40.0050.00815.07
7.3.30.0080.00514.94
7.3.20.0080.00716.82
7.3.10.0090.00516.90
7.3.00.0040.00616.74
7.2.330.0110.01116.76
7.2.320.0100.01316.82
7.2.310.0070.01316.79
7.2.300.0140.00416.72
7.2.290.0080.00816.82
7.2.260.0070.01214.88
7.2.250.0060.01115.24
7.2.240.0080.00915.36
7.2.230.0110.00515.17
7.2.220.0050.01015.12
7.2.210.0060.00915.23
7.2.200.0060.00715.20
7.2.190.0050.01015.17
7.2.180.0060.00715.26
7.2.170.0050.00715.18
7.2.160.0080.00415.29
7.2.150.0070.01017.16
7.2.140.0070.00917.06
7.2.130.0070.00616.97
7.2.120.0060.01017.13
7.2.110.0070.00617.14
7.2.100.0060.00817.11
7.2.90.0080.00717.22
7.2.80.0060.00916.96
7.2.70.0070.00817.16
7.2.60.0090.00617.16
7.2.50.0050.00717.01
7.2.40.0050.00917.04
7.2.30.0050.00716.96
7.2.20.0080.00617.13
7.2.10.0100.00416.99
7.2.00.0060.00817.62
7.1.330.0070.00915.82
7.1.320.0060.00915.90
7.1.310.0070.00615.84
7.1.300.0030.01215.93
7.1.290.0050.00615.77
7.1.280.0050.00616.04
7.1.270.0070.00715.90
7.1.260.0060.00716.03
7.1.250.0030.01016.00
7.1.240.0080.00416.02
7.1.230.0030.01115.81
7.1.220.0000.01115.79
7.1.210.0020.00815.83
7.1.200.0070.00515.91
7.1.190.0060.00715.76
7.1.180.0060.00815.91
7.1.170.0060.00815.88
7.1.160.0040.00915.86
7.1.150.0070.00515.80
7.1.140.0100.00415.77
7.1.130.0060.00715.88
7.1.120.0060.00815.86
7.1.110.0040.00816.00
7.1.100.0040.00916.53
7.1.90.0060.00515.90
7.1.80.0040.00915.77
7.1.70.0060.00616.15
7.1.60.0100.01120.81
7.1.50.0170.00520.63
7.1.40.0100.01120.61
7.1.30.0110.00920.54
7.1.20.0110.00920.59
7.1.10.0040.01016.16
7.1.00.0090.00616.12
7.0.330.0070.00515.61
7.0.320.0030.00815.63
7.0.310.0060.00515.64
7.0.300.0040.00915.49
7.0.290.0030.01015.45
7.0.280.0040.00815.58
7.0.270.0030.00915.68
7.0.260.0050.00815.54
7.0.250.0050.00815.69
7.0.240.0080.00615.63
7.0.230.0050.00615.66
7.0.220.0050.00515.45
7.0.210.0080.00415.52
7.0.200.0060.01115.79
7.0.190.0090.00815.92
7.0.180.0080.00715.94
7.0.170.0060.01015.69
7.0.160.0060.00815.83
7.0.150.0060.01115.75
7.0.140.0070.00515.80
7.0.130.0100.00615.71
7.0.120.0070.00715.97
7.0.110.0060.00915.75
7.0.100.0050.01115.88
7.0.90.0070.00715.82
7.0.80.0070.00915.79
7.0.70.0080.00615.83
7.0.60.0060.00815.75
7.0.50.0080.00715.95
7.0.40.0040.01114.35
7.0.30.0060.00714.46
7.0.20.0060.00714.40
7.0.10.0070.00514.33
7.0.00.0060.00814.47
5.6.400.0060.00614.27
5.6.390.0020.01114.48
5.6.380.0050.00714.57
5.6.370.0070.01014.36
5.6.360.0080.00614.55
5.6.350.0050.01014.34
5.6.340.0040.00914.37
5.6.330.0040.01014.32
5.6.320.0060.00814.38
5.6.310.0050.01114.34
5.6.300.0110.00614.24
5.6.290.0060.01014.32
5.6.280.0020.01014.52
5.6.270.0060.00814.32
5.6.260.0080.00514.43
5.6.250.0050.00814.22
5.6.240.0030.00814.43
5.6.230.0040.01114.42
5.6.220.0060.00814.18
5.6.210.0060.00914.31
5.6.200.0060.00614.43
5.6.190.0010.01214.22
5.6.180.0050.00714.54
5.6.170.0050.00514.40
5.6.160.0060.00914.24
5.6.150.0080.00714.40
5.6.140.0060.00514.19
5.6.130.0060.00614.33
5.6.120.0070.00614.36
5.6.110.0090.00814.52
5.6.100.0050.00914.34
5.6.90.0030.01014.28
5.6.80.0030.00814.23
5.6.70.0050.00614.39
5.6.60.0080.00414.44
5.6.50.0050.00914.21
5.6.40.0070.00414.35
5.6.30.0030.01014.26
5.6.20.0080.00314.35
5.6.10.0040.00914.52
5.6.00.0080.00314.42

preferences:
41.36 ms | 400 KiB | 5 Q