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.0060.00918.80
8.3.50.0070.01016.62
8.3.40.0040.01118.96
8.3.30.0110.00418.76
8.3.20.0090.00620.09
8.3.10.0080.00023.66
8.3.00.0040.00419.68
8.2.180.0130.00716.88
8.2.170.0100.01022.96
8.2.160.0040.01119.21
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0080.00019.13
8.2.120.0050.00326.35
8.2.110.0030.00620.14
8.2.100.0000.01117.91
8.2.90.0050.00319.09
8.2.80.0030.00517.97
8.2.70.0080.00317.50
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0000.00720.59
8.2.30.0030.00619.26
8.2.20.0040.00418.20
8.2.10.0000.00718.22
8.2.00.0040.00418.16
8.1.280.0040.01125.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0080.00319.22
8.1.220.0030.00517.80
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00517.47
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0000.00719.05
8.1.150.0050.00320.68
8.1.140.0000.00717.54
8.1.130.0030.00318.92
8.1.120.0000.00717.61
8.1.110.0000.00717.52
8.1.100.0050.00417.57
8.1.90.0050.00317.55
8.1.80.0070.00017.57
8.1.70.0050.00517.47
8.1.60.0050.00317.78
8.1.50.0040.00417.58
8.1.40.0070.00417.57
8.1.30.0050.00317.89
8.1.20.0030.00517.67
8.1.10.0050.00317.70
8.1.00.0040.00417.49
8.0.300.0050.00318.77
8.0.290.0090.00016.75
8.0.280.0000.00718.40
8.0.270.0000.00816.97
8.0.260.0100.00016.98
8.0.250.0030.00317.16
8.0.240.0000.00717.11
8.0.230.0000.00817.00
8.0.220.0040.00417.11
8.0.210.0040.00417.01
8.0.200.0000.00817.07
8.0.190.0060.00317.18
8.0.180.0050.00217.10
8.0.170.0050.00217.02
8.0.160.0000.00717.02
8.0.150.0000.00816.94
8.0.140.0030.00316.85
8.0.130.0000.00513.46
8.0.120.0030.00517.02
8.0.110.0040.00416.96
8.0.100.0000.00716.94
8.0.90.0000.00716.92
8.0.80.0030.01317.11
8.0.70.0000.00817.12
8.0.60.0030.00617.12
8.0.50.0020.00517.06
8.0.30.0090.01017.35
8.0.20.0130.00517.45
8.0.10.0050.00217.13
8.0.00.0070.01017.00
7.4.330.0000.00515.55
7.4.320.0070.00016.59
7.4.300.0000.00716.74
7.4.290.0060.00316.81
7.4.280.0040.00416.77
7.4.270.0040.00416.73
7.4.260.0000.00716.61
7.4.250.0060.00316.65
7.4.240.0000.00816.82
7.4.230.0030.00316.64
7.4.220.0100.01016.86
7.4.210.0170.00016.80
7.4.200.0030.00316.68
7.4.160.0080.01016.58
7.4.150.0090.00917.40
7.4.140.0120.00517.86
7.4.130.0110.00816.50
7.4.120.0120.00916.81
7.4.110.0160.00816.77
7.4.100.0130.00316.48
7.4.90.0090.00616.56
7.4.80.0090.00919.39
7.4.70.0060.01116.74
7.4.60.0130.00616.77
7.4.50.0110.00616.71
7.4.40.0110.00616.72
7.4.30.0060.01016.77
7.4.10.0070.01015.28
7.4.00.0050.01215.11
7.3.330.0000.00513.29
7.3.320.0000.00613.23
7.3.310.0080.00016.25
7.3.300.0030.00516.46
7.3.290.0070.00816.44
7.3.280.0070.00916.43
7.3.270.0140.00517.40
7.3.260.0100.00716.67
7.3.250.0100.00716.70
7.3.240.0120.00716.61
7.3.230.0140.00616.61
7.3.210.0070.01316.75
7.3.200.0090.00916.54
7.3.190.0160.00516.46
7.3.180.0090.00816.70
7.3.170.0030.01316.74
7.3.160.0130.00316.46
7.3.130.0070.01115.20
7.3.120.0040.01415.06
7.3.110.0060.01315.13
7.3.100.0070.01114.73
7.3.90.0110.00714.85
7.3.80.0030.01514.95
7.3.70.0070.01014.97
7.3.60.0090.00915.00
7.3.50.0000.01214.88
7.3.40.0100.00315.13
7.3.30.0060.00314.87
7.3.20.0070.00716.98
7.3.10.0120.00016.85
7.3.00.0040.01116.82
7.2.330.0110.00716.83
7.2.320.0040.01416.91
7.2.310.0090.00616.64
7.2.300.0060.01216.59
7.2.290.0090.01116.61
7.2.260.0070.00715.08
7.2.250.0110.00415.07
7.2.240.0090.00615.34
7.2.230.0110.00715.14
7.2.220.0060.00915.14
7.2.210.0090.00915.09
7.2.200.0100.00714.81
7.2.190.0030.01415.25
7.2.180.0000.01115.19
7.2.170.0090.00615.05
7.2.160.0110.00415.30
7.2.150.0120.00017.04
7.2.140.0070.00417.23
7.2.130.0140.00317.10
7.2.120.0060.00617.16
7.2.110.0040.01117.20
7.2.100.0000.01317.05
7.2.90.0000.01017.11
7.2.80.0090.00617.17
7.2.70.0110.00417.08
7.2.60.0090.00517.21
7.2.50.0060.00616.79
7.2.40.0070.00716.95
7.2.30.0030.01317.07
7.2.20.0030.01217.10
7.2.10.0040.00817.04
7.2.00.0040.00717.04
7.1.330.0130.00015.92
7.1.320.0100.00715.99
7.1.310.0040.01215.89
7.1.300.0090.00615.97
7.1.290.0080.00815.90
7.1.280.0100.00315.85
7.1.270.0000.01216.02
7.1.260.0030.00616.13
7.1.250.0070.01015.84
7.1.240.0040.00815.96
7.1.230.0060.01015.99
7.1.220.0040.01415.95
7.1.210.0040.01115.80
7.1.200.0050.00515.71
7.1.190.0100.00316.13
7.1.180.0030.00615.77
7.1.170.0040.01216.07
7.1.160.0000.01215.75
7.1.150.0060.00615.88
7.1.140.0080.00816.00
7.1.130.0060.00615.96
7.1.120.0030.00915.96
7.1.110.0110.00415.93
7.1.100.0030.00715.88
7.1.90.0090.00315.85
7.1.80.0030.01315.61
7.1.70.0140.00516.50
7.1.60.0160.01325.46
7.1.50.0210.01125.60
7.1.40.0190.01225.17
7.1.30.0110.01725.25
7.1.20.0170.01425.34
7.1.10.0080.00516.15
7.1.00.0090.00716.17
7.0.330.0060.00815.63
7.0.320.0110.00415.57
7.0.310.0000.01015.43
7.0.300.0040.00415.61
7.0.290.0060.00315.63
7.0.280.0040.00415.52
7.0.270.0060.00315.64
7.0.260.0110.00315.78
7.0.250.0040.00415.75
7.0.240.0100.00315.49
7.0.230.0000.01515.51
7.0.220.0070.00415.75
7.0.210.0000.00915.50
7.0.200.0090.00816.21
7.0.190.0490.00716.04
7.0.180.0050.01315.96
7.0.170.0050.00915.88
7.0.160.0070.00815.94
7.0.150.0070.00815.90
7.0.140.0110.00515.99
7.0.130.0050.01116.21
7.0.120.0080.00616.16
7.0.110.0090.00816.25
7.0.100.0050.01215.97
7.0.90.0070.00916.07
7.0.80.0100.01116.08
7.0.70.0130.00716.00
7.0.60.0050.01216.05
7.0.50.0030.01515.92
7.0.40.0100.00515.08
7.0.30.0070.01015.25
7.0.20.0050.01515.20
7.0.10.0070.01015.18
7.0.00.0040.01215.06
5.6.400.0040.00414.48
5.6.390.0000.01514.03
5.6.380.0040.01114.48
5.6.370.0040.01114.40
5.6.360.0050.00514.35
5.6.350.0090.00314.13
5.6.340.0030.00914.62
5.6.330.0000.01514.26
5.6.320.0100.00314.27
5.6.310.0070.01014.18
5.6.300.0000.01314.61
5.6.290.0090.00614.46
5.6.280.0080.00414.47
5.6.270.0070.00414.48
5.6.260.0070.00714.67
5.6.250.0040.00414.71
5.6.240.0030.01014.39
5.6.230.0040.01114.31
5.6.220.0040.00414.34
5.6.210.0000.00814.32
5.6.200.0030.00914.11
5.6.190.0060.00614.46
5.6.180.0030.00614.40
5.6.170.0030.00614.49
5.6.160.0060.00314.23
5.6.150.0060.00914.26
5.6.140.0030.00914.09
5.6.130.0070.00714.41
5.6.120.0070.01014.52
5.6.110.0000.01214.39
5.6.100.0070.00314.07
5.6.90.0030.01014.39
5.6.80.0030.01314.40
5.6.70.0070.00714.34
5.6.60.0070.00314.15
5.6.50.0030.00714.26
5.6.40.0030.00914.20
5.6.30.0030.01214.21
5.6.20.0030.00914.36
5.6.10.0040.00414.00
5.6.00.0040.00414.07

preferences:
42.84 ms | 400 KiB | 5 Q