3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '(`anurag`, 1,2), (1,2,3, `dm0c60544`, 5),(2 ,3 ,3) '; $pattern = '#`[a-zA-Z0-9]+`,#'; // our regex pattern $string = preg_replace($pattern, '', $string); //replace backticked text and the following comma $string = str_replace(' ', '', $string); // remove unwanted whitespace 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.0120.00318.43
8.3.50.0140.00416.43
8.3.40.0070.00718.96
8.3.30.0150.00018.79
8.3.20.0080.00020.39
8.3.10.0080.00023.56
8.3.00.0080.00019.56
8.2.180.0210.00018.67
8.2.170.0030.01022.96
8.2.160.0060.00919.02
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0050.00519.00
8.2.120.0030.00626.35
8.2.110.0070.00320.99
8.2.100.0040.00817.84
8.2.90.0040.00418.13
8.2.80.0040.00420.54
8.2.70.0000.00817.93
8.2.60.0040.00418.09
8.2.50.0040.00418.10
8.2.40.0040.00420.50
8.2.30.0050.00321.09
8.2.20.0040.00418.01
8.2.10.0050.00218.02
8.2.00.0040.00418.04
8.1.280.0070.01025.92
8.1.270.0040.00422.14
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0100.00722.14
8.1.230.0080.00320.91
8.1.220.0040.00417.78
8.1.210.0050.00319.04
8.1.200.0060.00317.35
8.1.190.0050.00317.36
8.1.180.0060.00318.10
8.1.170.0040.00418.62
8.1.160.0070.00018.96
8.1.150.0000.00818.72
8.1.140.0040.00419.54
8.1.130.0070.00018.77
8.1.120.0030.00617.46
8.1.110.0000.00817.55
8.1.100.0040.00417.51
8.1.90.0040.00417.49
8.1.80.0030.00517.57
8.1.70.0040.00417.59
8.1.60.0050.00317.67
8.1.50.0080.00017.53
8.1.40.0000.01117.46
8.1.30.0080.00017.71
8.1.20.0000.00717.70
8.1.10.0080.00017.62
8.1.00.0050.00217.59
8.0.300.0040.00420.21
8.0.290.0060.00316.75
8.0.280.0000.00718.35
8.0.270.0040.00417.29
8.0.260.0000.00716.87
8.0.250.0030.00316.99
8.0.240.0030.00317.07
8.0.230.0030.00316.98
8.0.220.0070.00016.89
8.0.210.0000.00716.87
8.0.200.0000.00617.07
8.0.190.0000.00817.05
8.0.180.0040.00417.01
8.0.170.0030.00316.97
8.0.160.0030.00417.04
8.0.150.0000.00716.92
8.0.140.0040.00416.82
8.0.130.0000.00613.44
8.0.120.0040.00416.91
8.0.110.0040.00416.86
8.0.100.0080.00016.92
8.0.90.0000.00817.02
8.0.80.0070.01016.86
8.0.70.0000.00816.79
8.0.60.0020.00516.86
8.0.50.0000.00717.00
8.0.30.0100.01017.13
8.0.20.0100.01017.40
8.0.10.0000.00817.13
8.0.00.0090.00916.79
7.4.330.0050.00015.55
7.4.320.0000.00616.75
7.4.300.0000.00616.66
7.4.290.0090.00316.76
7.4.280.0000.00716.75
7.4.270.0020.00516.54
7.4.260.0030.00316.63
7.4.250.0030.00516.61
7.4.240.0030.00416.66
7.4.230.0040.00416.75
7.4.220.0130.01016.68
7.4.210.0120.00316.65
7.4.200.0000.00716.84
7.4.160.0160.00016.63
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0190.00716.59
7.4.120.0140.00716.64
7.4.110.0150.00316.78
7.4.100.0170.00616.85
7.4.90.0130.00316.75
7.4.80.0100.00719.39
7.4.70.0040.01216.84
7.4.60.0040.01116.57
7.4.50.0060.01016.39
7.4.40.0060.00916.74
7.4.30.0110.00716.82
7.4.00.0070.00815.03
7.3.330.0000.00513.17
7.3.320.0030.00513.13
7.3.310.0000.00716.38
7.3.300.0000.00716.20
7.3.290.0050.00916.32
7.3.280.0080.01016.34
7.3.270.0120.00917.40
7.3.260.0070.01016.51
7.3.250.0100.00816.48
7.3.240.0090.00716.50
7.3.230.0190.00316.39
7.3.210.0090.00916.38
7.3.200.0100.00616.51
7.3.190.0140.00316.53
7.3.180.0040.01116.28
7.3.170.0030.01316.39
7.3.160.0090.00616.28
7.3.120.0060.01014.77
7.3.110.0040.01114.95
7.3.100.0070.01015.20
7.3.90.0040.00414.74
7.3.80.0060.00315.18
7.3.70.0060.00614.86
7.3.60.0040.00414.80
7.3.50.0060.00614.95
7.3.40.0030.01214.79
7.3.30.0000.01614.97
7.3.20.0060.00616.82
7.3.10.0070.00716.65
7.3.00.0040.01116.76
7.2.330.0070.01116.86
7.2.320.0100.01316.81
7.2.310.0070.01016.83
7.2.300.0120.01016.70
7.2.290.0070.01016.73
7.2.250.0090.00614.87
7.2.240.0060.01314.80
7.2.230.0030.01314.93
7.2.220.0030.01014.88
7.2.210.0030.01014.89
7.2.200.0090.00315.19
7.2.190.0060.00915.04
7.2.180.0060.00315.07
7.2.170.0140.00015.20
7.2.60.0030.01016.73
7.2.00.0070.01019.77
7.1.330.0070.00716.05
7.1.320.0000.01415.96
7.1.310.0090.00615.64
7.1.300.0100.00415.91
7.1.290.0030.01315.91
7.1.280.0060.00915.68
7.1.270.0040.00715.71
7.1.260.0040.01215.59
7.1.200.0390.00315.91
7.1.100.0050.00818.54
7.1.70.0090.01517.48
7.1.60.0350.01235.44
7.1.50.0210.01335.15
7.1.40.0330.01634.37
7.1.30.0320.00634.58
7.1.20.0240.01135.00
7.1.10.0090.01916.93
7.1.00.0030.01316.95
7.0.200.0080.01116.93
7.0.190.0140.00616.96
7.0.180.0110.00816.51
7.0.170.0170.01116.35
7.0.160.0160.00816.65
7.0.150.0110.01316.50
7.0.140.0060.01416.63
7.0.130.0070.00716.43
7.0.120.0000.01516.88
7.0.110.0000.01716.48
7.0.100.0090.01116.60
7.0.90.0130.00716.57
7.0.80.0090.00916.49
7.0.70.0070.01316.37
7.0.60.0030.01716.40
7.0.50.0040.01216.60
7.0.40.0100.00616.85
7.0.30.0090.00616.60
7.0.20.0150.00016.63
7.0.10.0120.00316.70
7.0.00.0030.01316.47

preferences:
59.8 ms | 401 KiB | 5 Q