3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callback = function ($matches) { $string = $matches[1]; $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); return $string; }; $string = '(`anurag`, 1,2), (1,2,3, `dm0c60544`),(2 ,3 ,3) '; $pattern = '#`.+`#'; // our regex pattern $string = preg_replace_callback($pattern, $callback, $string); //replace backticked text and the following comma echo $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.0070.00718.55
8.3.50.0120.00616.53
8.3.40.0110.00319.00
8.3.30.0110.00718.79
8.3.20.0080.00020.34
8.3.10.0050.00323.64
8.3.00.0040.00419.55
8.2.180.0070.01418.91
8.2.170.0070.01022.96
8.2.160.0110.00419.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0000.00819.94
8.2.110.0040.00720.44
8.2.100.0000.01317.83
8.2.90.0040.00419.06
8.2.80.0040.00417.97
8.2.70.0030.00717.88
8.2.60.0040.00418.04
8.2.50.0060.00318.10
8.2.40.0060.00320.47
8.2.30.0000.00819.30
8.2.20.0040.00418.09
8.2.10.0060.00318.19
8.2.00.0030.00618.16
8.1.280.0100.00725.92
8.1.270.0040.00421.97
8.1.260.0000.00926.35
8.1.250.0030.00528.09
8.1.240.0060.00320.68
8.1.230.0070.00418.94
8.1.220.0100.00017.91
8.1.210.0030.00518.77
8.1.200.0090.00017.59
8.1.190.0030.00517.48
8.1.180.0060.00318.10
8.1.170.0040.00418.77
8.1.160.0000.00719.06
8.1.150.0000.00820.70
8.1.140.0000.00719.52
8.1.130.0040.00418.84
8.1.120.0030.00517.66
8.1.110.0000.00817.54
8.1.100.0030.00517.59
8.1.90.0030.00617.47
8.1.80.0060.00317.59
8.1.70.0060.00317.59
8.1.60.0080.00017.73
8.1.50.0000.00817.65
8.1.40.0110.00017.65
8.1.30.0030.00517.84
8.1.20.0040.00417.84
8.1.10.0000.00817.61
8.1.00.0000.00817.69
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0030.00318.54
8.0.270.0000.00717.20
8.0.260.0030.00316.95
8.0.250.0030.00317.18
8.0.240.0000.00817.13
8.0.230.0000.00716.97
8.0.220.0000.00716.93
8.0.210.0040.00416.90
8.0.200.0040.00417.20
8.0.190.0060.00317.23
8.0.180.0050.00317.11
8.0.170.0070.00016.96
8.0.160.0040.00417.13
8.0.150.0030.00317.00
8.0.140.0040.00417.10
8.0.130.0000.00613.49
8.0.120.0080.00017.05
8.0.110.0040.00417.13
8.0.100.0000.00716.94
8.0.90.0000.00817.17
8.0.80.0030.01317.14
8.0.70.0050.00317.18
8.0.60.0040.00417.13
8.0.50.0040.00417.05
8.0.30.0120.00617.40
8.0.20.0110.01017.40
8.0.10.0030.00517.27
8.0.00.0100.00716.77
7.4.330.0000.00515.55
7.4.320.0030.00316.73
7.4.300.0060.00016.70
7.4.290.0040.00416.86
7.4.280.0030.00516.76
7.4.270.0000.00716.71
7.4.260.0000.00716.71
7.4.250.0040.00416.77
7.4.240.0000.00816.75
7.4.230.0040.00416.68
7.4.220.0120.00616.83
7.4.210.0070.01016.59
7.4.200.0000.00716.88
7.4.160.0100.00616.65
7.4.150.0120.00617.40
7.4.140.0120.00717.86
7.4.130.0180.00016.68
7.4.120.0120.01016.72
7.4.110.0070.01116.62
7.4.100.0120.00716.70
7.4.90.0100.00716.71
7.4.80.0060.01019.39
7.4.70.0130.00316.83
7.4.60.0060.01116.96
7.4.50.0120.00316.80
7.4.40.0000.01616.61
7.4.30.0120.00616.68
7.4.00.0080.01115.21
7.3.330.0060.00013.52
7.3.320.0070.00013.64
7.3.310.0030.00316.56
7.3.300.0020.00516.45
7.3.290.0070.00916.49
7.3.280.0100.00816.49
7.3.270.0090.00917.40
7.3.260.0140.00516.67
7.3.250.0070.01316.67
7.3.240.0050.01416.73
7.3.230.0150.00316.62
7.3.210.0140.00716.55
7.3.200.0100.00616.43
7.3.190.0090.00916.74
7.3.180.0070.01016.74
7.3.170.0110.00516.58
7.3.160.0060.01116.65
7.3.120.0070.01114.89
7.3.110.0070.01115.13
7.3.100.0070.00915.18
7.3.90.0060.01015.13
7.3.80.0090.00615.10
7.3.70.0020.00914.99
7.3.60.0090.00614.91
7.3.50.0050.00715.00
7.3.40.0070.00814.87
7.3.30.0100.00514.99
7.3.20.0050.00516.71
7.3.10.0060.00916.81
7.3.00.0070.00716.93
7.2.330.0070.01016.82
7.2.320.0090.00916.79
7.2.310.0130.00316.77
7.2.300.0000.01616.69
7.2.290.0090.00916.73
7.2.250.0050.01115.16
7.2.240.0040.01615.25
7.2.230.0080.00715.21
7.2.220.0070.00915.12
7.2.210.0080.00515.40
7.2.200.0070.00715.23
7.2.190.0040.01215.26
7.2.180.0100.00615.05
7.2.170.0060.01015.17
7.2.80.0170.00716.84
7.2.60.0060.00616.69
7.1.330.0050.01015.83
7.1.320.0030.00915.79
7.1.310.0070.00515.81
7.1.300.0010.01115.89
7.1.290.0050.00815.95
7.1.280.0020.01115.84
7.1.270.0080.00816.01
7.1.260.0080.00315.84
7.1.200.0100.00315.97
7.1.70.0190.01517.29
7.1.60.0250.01735.37
7.1.50.0270.01934.79
7.1.40.0270.01234.62
7.1.30.0220.01834.71
7.1.20.0320.01834.84
7.1.10.0080.01217.01
7.1.00.0090.01616.96
7.0.200.0140.00917.02
7.0.190.0120.00816.90
7.0.180.0080.01016.57
7.0.170.0110.01316.36
7.0.160.0070.01416.48
7.0.150.0090.01116.46
7.0.140.0100.01016.50
7.0.130.0140.00916.95
7.0.120.0080.01216.66
7.0.110.0110.01116.41
7.0.100.0130.00916.54
7.0.90.0060.01416.69
7.0.80.0060.01516.55
7.0.70.0050.01616.45
7.0.60.0130.00616.27
7.0.50.0090.01316.63
7.0.40.0070.01916.61
7.0.30.0040.01816.58
7.0.20.0170.00716.69
7.0.10.0120.01316.75
7.0.00.0120.01016.33

preferences:
44.88 ms | 400 KiB | 5 Q