3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ingredients = "aaa (1,2,3) bbb [4,5,6,7]"; $clean_ingredients = preg_replace_callback('/\([^()]*\)|\[[^][]*]/', function($m) {return str_replace(',', '! ', $m[0]);}, $ingredients ); echo $clean_ingredients;

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.4.120.0130.00520.66
8.4.110.0080.01120.62
8.4.100.0120.00917.90
8.4.90.0090.00817.93
8.4.80.0110.01019.78
8.4.70.0050.00419.82
8.4.60.0110.00118.09
8.4.50.0140.00617.87
8.4.40.0070.01320.55
8.4.30.0080.00024.09
8.4.20.0130.00719.94
8.4.10.0110.00722.23
8.3.250.0140.00617.10
8.3.240.0140.00516.79
8.3.230.0160.00416.69
8.3.220.0060.00716.69
8.3.210.0130.00416.82
8.3.200.0110.00818.67
8.3.190.0130.00618.42
8.3.180.0060.00416.66
8.3.170.0090.00918.81
8.3.160.0090.00916.68
8.3.150.0110.00717.04
8.3.140.0050.00318.43
8.3.130.0080.00016.77
8.3.120.0050.00319.02
8.3.110.0000.01020.94
8.3.100.0080.00016.77
8.3.90.0080.00018.41
8.3.80.0060.00318.56
8.3.70.0130.00616.63
8.3.60.0140.00016.88
8.3.50.0070.00716.66
8.3.40.0120.00621.88
8.3.30.0150.00318.97
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0110.00920.57
8.2.280.0100.00918.66
8.2.270.0040.01417.43
8.2.260.0030.00618.41
8.2.250.0050.00316.95
8.2.240.0050.00317.05
8.2.230.0050.00522.58
8.2.220.0060.00324.06
8.2.210.0070.01126.77
8.2.200.0030.00618.54
8.2.190.0120.00918.79
8.2.180.0100.01018.79
8.2.170.0150.00319.21
8.2.160.0140.00022.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00417.72
8.2.110.0100.00021.16
8.2.100.0040.00717.91
8.2.90.0060.00318.16
8.2.80.0000.01019.95
8.2.70.0060.00317.88
8.2.60.0060.00317.97
8.2.50.0110.00617.38
8.2.40.0130.00317.62
8.2.30.0100.00717.50
8.2.20.0090.00917.34
8.2.10.0110.00617.50
8.2.00.0100.00717.53
8.1.330.0100.00822.10
8.1.320.0110.00816.41
8.1.310.0030.00516.65
8.1.300.0060.00318.37
8.1.290.0030.00718.88
8.1.280.0120.00325.92
8.1.270.0040.00420.58
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0100.00319.38
8.1.230.0060.00620.91
8.1.220.0040.00417.78
8.1.210.0040.00418.84
8.1.200.0080.00317.60
8.1.190.0170.00217.13
8.1.180.0080.00817.12
8.1.170.0170.00017.13
8.1.160.0150.00417.50
8.1.150.0120.00817.36
8.1.140.0120.00517.13
8.1.130.0100.00717.50
8.1.120.0110.00717.50
8.1.110.0070.01017.25
8.1.100.0080.00817.38
8.1.90.0140.00317.63
8.1.80.0150.00317.47
8.1.70.0130.00417.38
8.1.60.0050.01417.50
8.1.50.0120.00617.25
8.1.40.0150.00417.50
8.1.30.0110.00717.38
8.1.20.0130.00417.63
8.1.10.0110.00717.10
8.1.00.0070.01017.11
8.0.300.0050.00219.86
8.0.290.0040.00417.00
8.0.280.0170.00016.63
8.0.270.0110.00516.61
8.0.260.0100.00716.63
8.0.250.0150.00316.52
8.0.240.0140.00316.63
8.0.230.0150.00216.52
8.0.220.0050.01416.52
8.0.210.0120.00616.59
8.0.200.0040.01416.52
8.0.190.0140.00316.52
8.0.180.0180.00016.86
8.0.170.0140.00316.75
8.0.160.0140.00216.75
8.0.150.0130.00516.63
8.0.140.0090.00916.61
8.0.130.0120.00616.75
8.0.120.0170.00016.52
8.0.110.0080.00816.72
8.0.100.0150.00316.52
8.0.90.0170.00016.52
8.0.80.0120.00616.75
8.0.70.0160.00016.86
8.0.60.0000.01616.52
8.0.50.0080.00816.52
8.0.30.0070.00716.75
8.0.20.0130.00316.75
8.0.10.0170.00016.75
7.4.330.0010.00416.52

preferences:
28.6 ms | 403 KiB | 5 Q