3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '(`anurag`, 1,2), (1,2,3, `dm0c60544`),(2 ,3 ,3) '; $pattern = '#`.+`#'; // our regex pattern $string = preg_replace($pattern, '', $string); //replace backticked text and the following comma $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 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.0080.00818.43
8.3.50.0000.01416.51
8.3.40.0110.00418.84
8.3.30.0070.00718.64
8.3.20.0040.00420.42
8.3.10.0100.00023.39
8.3.00.0040.00419.56
8.2.180.0090.00916.50
8.2.170.0090.00922.96
8.2.160.0090.00619.21
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00319.30
8.2.120.0070.00026.35
8.2.110.0060.00320.45
8.2.100.0090.00317.80
8.2.90.0040.00419.28
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0080.00017.93
8.2.50.0040.00418.10
8.2.40.0000.00820.59
8.2.30.0040.00419.28
8.2.20.0040.00417.97
8.2.10.0040.00418.06
8.2.00.0000.00718.25
8.1.280.0150.00025.92
8.1.270.0040.00422.02
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.75
8.1.230.0110.00019.01
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0040.00418.71
8.1.160.0000.00719.04
8.1.150.0040.00420.63
8.1.140.0000.00819.41
8.1.130.0040.00418.90
8.1.120.0040.00417.52
8.1.110.0040.00417.52
8.1.100.0030.00317.46
8.1.90.0040.00417.48
8.1.80.0030.00417.54
8.1.70.0030.00717.57
8.1.60.0050.00317.68
8.1.50.0000.00817.62
8.1.40.0030.00717.58
8.1.30.0030.00517.63
8.1.20.0070.00017.72
8.1.10.0030.00517.67
8.1.00.0040.00417.59
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0030.00318.39
8.0.270.0040.00417.26
8.0.260.0060.00316.96
8.0.250.0030.00317.16
8.0.240.0000.00717.12
8.0.230.0070.00017.05
8.0.220.0040.00416.94
8.0.210.0030.00516.88
8.0.200.0030.00316.92
8.0.190.0050.00317.02
8.0.180.0050.00217.00
8.0.170.0030.00317.00
8.0.160.0070.00016.94
8.0.150.0000.00816.92
8.0.140.0000.00716.87
8.0.130.0030.00313.41
8.0.120.0040.00416.95
8.0.110.0030.00317.00
8.0.100.0050.00317.07
8.0.90.0000.00817.02
8.0.80.0100.01016.93
8.0.70.0000.00817.00
8.0.60.0070.00017.01
8.0.50.0000.00716.83
8.0.30.0130.00817.20
8.0.20.0110.00817.40
8.0.10.0040.00417.09
8.0.00.0090.00916.76
7.4.330.0050.00015.55
7.4.320.0080.00016.67
7.4.300.0060.00016.69
7.4.290.0030.00716.61
7.4.280.0040.00416.64
7.4.270.0040.00416.60
7.4.260.0040.00416.74
7.4.250.0040.00416.52
7.4.240.0040.00416.76
7.4.230.0000.00716.74
7.4.220.0090.00916.61
7.4.210.0030.01316.61
7.4.200.0070.00016.80
7.4.160.0080.01016.63
7.4.150.0040.01317.40
7.4.140.0110.01017.86
7.4.130.0100.01016.74
7.4.120.0150.00916.58
7.4.110.0060.01016.66
7.4.100.0130.00416.67
7.4.90.0120.00616.68
7.4.80.0100.00719.39
7.4.70.0120.00916.72
7.4.60.0180.00316.60
7.4.50.0080.00816.75
7.4.40.0110.00716.68
7.4.30.0110.00516.66
7.4.10.0100.00715.20
7.4.00.0100.00815.20
7.3.330.0000.00513.26
7.3.320.0060.00013.28
7.3.310.0000.00716.33
7.3.300.0040.00416.34
7.3.290.0070.00716.37
7.3.280.0080.00916.39
7.3.270.0100.01017.40
7.3.260.0090.00816.58
7.3.250.0050.01216.63
7.3.240.0110.00716.38
7.3.230.0140.00916.56
7.3.210.0100.01016.35
7.3.200.0130.00316.50
7.3.190.0110.00716.60
7.3.180.0130.00316.71
7.3.170.0090.00616.41
7.3.160.0060.01016.37
7.3.130.0020.01014.93
7.3.120.0090.00915.12
7.3.110.0090.00614.93
7.3.100.0040.00814.91
7.3.90.0080.00814.77
7.3.80.0000.01514.79
7.3.70.0100.00315.05
7.3.60.0060.00915.08
7.3.50.0000.00814.95
7.3.40.0000.01514.79
7.3.30.0060.00914.93
7.3.20.0040.00816.56
7.3.10.0030.01416.79
7.3.00.0090.00616.75
7.2.330.0050.01616.65
7.2.320.0140.00316.70
7.2.310.0110.00616.75
7.2.300.0100.00616.65
7.2.290.0120.01016.51
7.2.260.0030.01415.14
7.2.250.0110.00715.12
7.2.240.0100.00615.24
7.2.230.0030.01314.94
7.2.220.0040.00715.11
7.2.210.0060.00915.02
7.2.200.0090.00015.03
7.2.190.0080.00515.08
7.2.180.0000.00915.11
7.2.170.0040.01115.02
7.2.160.0120.00315.05
7.2.150.0030.00617.07
7.2.140.0040.00916.85
7.2.130.0030.00817.09
7.2.120.0060.00316.92
7.2.110.0100.00716.96
7.2.100.0060.00917.16
7.2.90.0070.01117.05
7.2.80.0060.01016.85
7.2.70.0040.00816.86
7.2.60.0040.01117.05
7.2.50.0100.00616.95
7.2.40.0030.00917.17
7.2.30.0080.00817.21
7.2.20.0080.00417.09
7.2.10.0000.01416.95
7.2.00.0060.01018.37
7.1.330.0060.00615.62
7.1.320.0030.00915.99
7.1.310.0000.00915.88
7.1.300.0030.00615.86
7.1.290.0070.00715.82
7.1.280.0030.00916.04
7.1.270.0030.00915.82
7.1.260.0090.00315.72
7.1.250.0070.01015.98
7.1.240.0070.01015.81
7.1.230.0120.00316.06
7.1.220.0120.00316.04
7.1.210.0070.00716.14
7.1.200.0060.00715.90
7.1.190.0090.00015.84
7.1.180.0060.00915.75
7.1.170.0060.00916.09
7.1.160.0090.00615.96
7.1.150.0030.01415.77
7.1.140.0000.00816.07
7.1.130.0040.01115.76
7.1.120.0070.00715.92
7.1.110.0080.00816.04
7.1.100.0060.00816.81
7.1.90.0060.00616.03
7.1.80.0030.01316.08
7.1.70.0060.00716.57
7.1.60.0250.00825.46
7.1.50.0450.01025.56
7.1.40.0120.01725.21
7.1.30.0170.01325.36
7.1.20.0170.01025.17
7.1.10.0070.00916.25
7.1.00.0080.00916.48
7.0.330.0080.00415.59
7.0.320.0070.00715.45
7.0.310.0060.00615.43
7.0.300.0090.00315.55
7.0.290.0120.00615.37
7.0.280.0040.00715.38
7.0.270.0000.00815.52
7.0.260.0040.00815.59
7.0.250.0070.00715.65
7.0.240.0050.00515.43
7.0.230.0030.01015.58
7.0.220.0120.00315.63
7.0.210.0030.00915.39
7.0.200.0300.01315.32
7.0.190.0110.00716.31
7.0.180.0030.01115.82
7.0.170.0080.01116.10
7.0.160.0070.01215.81
7.0.150.0050.01115.96
7.0.140.0070.00716.12
7.0.130.0120.00216.21
7.0.120.0090.00816.08
7.0.110.0060.01215.87
7.0.100.0050.00916.06
7.0.90.0030.01316.05
7.0.80.0030.01516.02
7.0.70.0060.01015.91
7.0.60.0300.01515.75
7.0.50.0080.00916.09
7.0.40.0100.00715.27
7.0.30.0090.01015.23
7.0.20.0290.01115.22
7.0.10.0050.01015.22
7.0.00.0280.01114.36
5.6.400.0070.00714.70
5.6.390.0040.01114.23
5.6.380.0030.01414.19
5.6.370.0030.01314.61
5.6.360.0040.00414.37
5.6.350.0030.01014.41
5.6.340.0090.00314.59
5.6.330.0030.00914.72
5.6.320.0030.00614.25
5.6.310.0030.01014.79
5.6.300.0060.00914.28
5.6.290.0040.00814.61
5.6.280.0000.01314.59
5.6.270.0080.00014.25
5.6.260.0030.01014.55
5.6.250.0030.01214.36
5.6.240.0090.00614.17
5.6.230.0070.00714.41
5.6.220.0070.00314.37
5.6.210.0030.00914.27
5.6.200.0060.00614.60
5.6.190.0120.00314.43
5.6.180.0040.01114.59
5.6.170.0100.00014.56
5.6.160.0080.00314.34
5.6.150.0070.00414.41
5.6.140.0100.00313.98
5.6.130.0030.00914.28
5.6.120.0070.00714.52
5.6.110.0030.00714.39
5.6.100.0070.00714.23
5.6.90.0110.00414.11
5.6.80.0000.01513.96
5.6.70.0060.01014.09
5.6.60.0060.01014.14
5.6.50.0040.00814.39
5.6.40.0070.00714.34
5.6.30.0060.00614.32
5.6.20.0130.00014.36
5.6.10.0000.00914.35
5.6.00.0060.00614.21

preferences:
41.28 ms | 401 KiB | 5 Q