3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '[_wc_acof_6] i want to convert'; $replacements = ['6' => 'NEW_VALUE_FOR_6_KEY']; echo preg_replace_callback('~\[_wc_acof_(\d+)]~', function($m) use ($replacements){ return $replacements[$m[1]]; }, $text);

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.5.00.0240.00820.35
8.4.150.0010.00114.05
8.4.140.0180.00620.28
8.4.130.0130.00818.02
8.4.120.0060.00720.40
8.4.110.0140.00522.59
8.4.100.0110.01017.93
8.4.90.0100.01218.88
8.4.80.0060.00218.02
8.4.70.0110.00517.89
8.4.60.0050.00318.61
8.4.50.0050.01018.85
8.4.40.0100.01019.73
8.4.30.0170.00320.68
8.4.20.0130.00920.60
8.4.10.0000.01019.58
8.3.280.0130.00820.33
8.3.270.0090.01016.69
8.3.260.0150.00616.66
8.3.250.0070.00418.95
8.3.240.0110.00816.93
8.3.230.0120.00716.86
8.3.220.0100.01017.22
8.3.210.0090.00918.35
8.3.200.0050.00416.54
8.3.190.0100.00817.11
8.3.180.0110.00916.75
8.3.170.0120.00617.08
8.3.160.0090.00016.68
8.3.150.0140.00416.62
8.3.140.0110.00416.80
8.3.130.0040.00418.38
8.3.120.0030.00618.80
8.3.110.0040.00420.94
8.3.100.0060.00324.06
8.3.90.0060.00326.77
8.3.80.0090.00019.36
8.3.70.0040.01518.56
8.3.60.0140.00018.27
8.3.50.0100.01016.80
8.3.40.0120.00618.83
8.3.30.0040.01118.83
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0050.00226.16
8.2.290.0140.00520.30
8.2.280.0120.00718.52
8.2.270.0150.00317.16
8.2.260.0160.00318.71
8.2.250.0050.00518.83
8.2.240.0160.00317.10
8.2.230.0060.00322.58
8.2.220.0070.00337.54
8.2.210.0080.00026.77
8.2.200.0040.00418.88
8.2.190.0070.01116.73
8.2.180.0040.01125.92
8.2.170.0070.01118.96
8.2.160.0140.00022.96
8.2.150.0070.00025.66
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0060.00620.52
8.2.100.0040.00817.91
8.2.90.0040.00417.88
8.2.80.0040.00418.93
8.2.70.0080.00017.73
8.2.60.0000.00818.03
8.2.50.0040.00418.05
8.2.40.0000.00818.22
8.2.30.0040.00418.16
8.2.20.0040.00418.39
8.2.10.0030.00519.21
8.2.00.0040.00419.22
8.1.330.0060.00323.59
8.1.320.0110.00816.42
8.1.310.0100.00718.47
8.1.300.0030.01218.28
8.1.290.0040.00430.84
8.1.280.0120.00325.92
8.1.270.0040.00823.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00718.96
8.1.230.0080.00422.12
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0080.00017.47
8.1.190.0030.00517.50
8.1.180.0040.00418.10
8.1.170.0030.00618.78
8.1.160.0040.00418.93
8.1.150.0040.00418.79
8.1.140.0080.00018.88
8.1.130.0050.00320.26
8.1.120.0000.00717.54
8.1.110.0070.00017.59
8.1.100.0070.00017.66
8.1.90.0040.00317.52
8.1.80.0040.00417.53
8.1.70.0030.00517.58
8.1.60.0030.00617.62
8.1.50.0050.00317.68
8.1.40.0030.00617.70
8.1.30.0040.00417.70
8.1.20.0000.00717.80
8.1.10.0000.00817.71
8.1.00.0000.00817.68
8.0.300.0050.00218.77
8.0.290.0070.00016.88
8.0.280.0060.00318.48
8.0.270.0050.00218.02
8.0.260.0060.00018.59
8.0.250.0070.00017.09
8.0.240.0040.00417.12
8.0.230.0030.00317.09
8.0.220.0070.00016.95
8.0.210.0040.00417.03
8.0.200.0060.00017.03
8.0.190.0040.00416.98
8.0.180.0080.00016.95
8.0.170.0000.00917.10
8.0.160.0000.00817.04
8.0.150.0040.00416.93
8.0.140.0040.00416.88
8.0.130.0030.00313.49
8.0.120.0050.00316.95
8.0.110.0040.00416.92
8.0.100.0070.00016.98
8.0.90.0040.00416.93
8.0.80.0130.01017.03
8.0.70.0100.00716.99
8.0.60.0180.00616.99
8.0.50.0040.01416.97
8.0.30.0060.01317.09
8.0.20.0090.01016.98
8.0.10.0090.00617.12
8.0.00.0030.01617.14
7.4.330.0020.00215.55
7.4.320.0030.00316.67
7.4.300.0000.00616.73
7.4.290.0040.00416.76
7.4.280.0000.00716.70
7.4.270.0040.00416.82
7.4.260.0030.00313.50
7.4.250.0040.00416.80
7.4.240.0050.00316.71
7.4.230.0040.00416.90
7.4.220.0070.00016.84
7.4.210.0060.00916.74
7.4.200.0090.00616.77
7.4.190.0110.00916.84
7.4.180.0230.00316.74
7.4.160.0090.00916.78
7.4.150.0130.00316.71
7.4.140.0180.00416.69
7.4.130.0130.00616.77
7.4.120.0110.00716.70
7.4.110.0110.00716.75
7.4.100.0150.00916.84
7.4.90.0030.01216.76
7.4.80.0060.01016.85
7.4.70.0100.00316.68
7.4.60.0120.00916.84
7.4.50.0090.00616.70
7.4.40.0120.00316.64
7.4.30.0120.00316.63
7.4.20.0190.00316.57
7.4.10.0100.00916.69
7.4.00.0070.01016.68
7.3.330.0020.00516.54
7.3.320.0030.00313.29
7.3.310.0040.00416.32
7.3.300.0030.00316.49
7.3.290.0130.00316.41
7.3.280.0000.01316.52
7.3.270.0090.00416.34
7.3.260.0100.00316.46
7.3.250.0080.00816.39
7.3.240.0100.00616.40
7.3.230.0170.00016.46
7.3.220.0160.00616.48
7.3.210.0130.00616.45
7.3.200.0080.01216.46
7.3.190.0060.00916.36
7.3.180.0030.01316.43
7.3.170.0130.00316.34
7.3.160.0130.01316.55
7.3.150.0090.00916.45
7.3.140.0100.00716.48
7.3.130.0120.00816.44
7.3.120.0070.00716.44
7.3.110.0060.00916.39
7.3.100.0150.00316.36
7.3.90.0120.00316.63
7.3.80.0060.00916.33
7.3.70.0140.00416.53
7.3.60.0080.00416.57
7.3.50.0160.01016.56
7.3.40.0130.00816.61
7.3.30.0090.00616.62
7.3.20.0150.00616.70
7.3.10.0060.00916.50
7.3.00.0070.00716.61

preferences:
173.93 ms | 403 KiB | 5 Q