3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'item1' => 'red', 'item2' => 'blue#foo#', 'item3' => 'green', 'item4' => 'white#foo2#', 'item5' => 'bla#foo3#ck', 'item6' => 'yellow#foo#', ]; $translations = [ '~#foo#~' => 'John', '~#foo2#~' => 'California', '~#foo3#~' => 'Cola', ]; var_export(preg_replace(array_keys($translations), $translations, $array));

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.0140.00920.07
8.4.150.0020.00114.05
8.4.140.0160.00617.72
8.4.130.0070.00617.91
8.4.120.0130.00822.46
8.4.110.0110.01022.50
8.4.100.0090.00417.84
8.4.90.0130.00320.46
8.4.80.0080.00819.15
8.4.70.0130.00818.88
8.4.60.0110.00820.67
8.4.50.0150.00622.22
8.4.40.0100.01019.58
8.4.30.0060.00318.46
8.4.20.0030.00618.77
8.4.10.0040.00417.83
8.3.280.0140.00618.26
8.3.270.0120.00716.46
8.3.260.0120.00816.62
8.3.250.0130.00718.71
8.3.240.0110.00616.45
8.3.230.0110.00916.87
8.3.220.0070.01218.96
8.3.210.0120.01216.55
8.3.200.0070.00216.44
8.3.190.0080.01016.86
8.3.180.0050.00416.54
8.3.170.0150.00019.11
8.3.160.0140.00318.91
8.3.150.0040.01518.60
8.3.140.0040.00417.05
8.3.130.0080.00018.64
8.3.120.0090.00918.68
8.3.110.0040.00716.63
8.3.100.0030.00624.06
8.3.90.0030.00626.77
8.3.80.0030.00616.75
8.3.70.0080.00816.58
8.3.60.0090.00918.30
8.3.50.0130.00821.13
8.3.40.0070.00718.71
8.3.30.0120.00318.90
8.3.20.0000.00721.70
8.3.10.0090.00021.95
8.3.00.0090.00022.34
8.2.290.0080.00616.74
8.2.280.0120.00718.57
8.2.270.0120.00617.20
8.2.260.0060.00316.57
8.2.250.0070.00316.70
8.2.240.0040.01117.00
8.2.230.0030.01620.94
8.2.220.0090.00037.54
8.2.210.0000.00826.77
8.2.200.0060.00316.88
8.2.190.0160.00016.58
8.2.180.0120.00618.18
8.2.170.0150.00619.13
8.2.160.0070.01022.96
8.2.150.0090.00024.18
8.2.140.0030.00624.66
8.2.130.0050.00326.16
8.2.120.0000.00726.16
8.2.110.0060.00320.29
8.2.100.0060.00617.84
8.2.90.0060.00617.75
8.2.80.0000.00817.97
8.2.70.0000.00817.80
8.2.60.0090.00018.09
8.2.50.0060.00618.10
8.2.40.0000.00819.27
8.2.30.0040.00419.20
8.2.20.0040.00417.92
8.2.10.0000.00819.08
8.2.00.0080.00019.15
8.1.330.0080.01121.92
8.1.320.0120.00716.14
8.1.310.0130.00618.38
8.1.300.0080.00820.28
8.1.290.0060.00318.88
8.1.280.0070.00725.92
8.1.270.0050.00320.70
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00024.02
8.1.230.0130.00318.99
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00517.35
8.1.180.0060.00318.10
8.1.170.0050.00318.64
8.1.160.0030.00618.79
8.1.150.0000.00718.71
8.1.140.0080.00020.96
8.1.130.0000.00720.14
8.1.120.0000.00817.54
8.1.110.0050.00517.45
8.1.100.0000.00917.42
8.1.90.0030.00617.42
8.1.80.0030.00317.53
8.1.70.0040.00417.48
8.1.60.0040.00417.66
8.1.50.0060.00317.65
8.1.40.0030.00517.48
8.1.30.0000.00817.74
8.1.20.0040.00417.74
8.1.10.0030.00617.56
8.1.00.0040.00417.38
8.0.300.0000.00821.65
8.0.290.0090.00016.63
8.0.280.0000.00818.34
8.0.270.0070.00017.12
8.0.260.0000.00618.44
8.0.250.0000.00717.00
8.0.240.0070.00017.10
8.0.230.0070.00017.04
8.0.220.0090.00017.02
8.0.210.0000.00816.85
8.0.200.0000.00716.90
8.0.190.0000.00717.07
8.0.180.0040.00417.03
8.0.170.0060.00316.91
8.0.160.0000.00717.04
8.0.150.0070.00016.79
8.0.140.0030.00316.82
8.0.130.0060.00013.44
8.0.120.0040.00416.95
8.0.110.0040.00417.03
8.0.100.0070.00016.98
8.0.90.0070.00016.92
8.0.80.0070.01416.97
8.0.70.0040.00416.95
8.0.60.0050.00216.91
8.0.50.0040.00416.83
8.0.30.0040.01416.96
8.0.20.0130.00617.00
8.0.10.0000.00717.08
8.0.00.0100.00916.75
7.4.330.0000.00515.55
7.4.320.0040.00416.54
7.4.300.0000.00616.66
7.4.290.0040.00416.59
7.4.280.0050.00316.75
7.4.270.0000.00716.58
7.4.260.0030.00316.66
7.4.250.0000.00716.73
7.4.240.0000.00716.71
7.4.230.0060.00316.54
7.4.220.0020.00516.72
7.4.210.0050.00916.70
7.4.200.0000.00816.84
7.4.130.0060.01616.66
7.4.120.0150.00916.54
7.4.110.0040.01216.46
7.4.100.0140.00816.50
7.4.90.0090.00916.64
7.4.80.0130.00919.39
7.4.70.0150.00616.53
7.4.60.0080.01416.49
7.4.50.0060.00916.58
7.4.40.0030.01316.57
7.4.00.0050.01014.85
7.3.330.0070.00016.25
7.3.320.0030.00313.14
7.3.310.0030.00316.32
7.3.300.0030.00316.31
7.3.290.0030.00316.28
7.3.280.0040.01116.27
7.3.260.0150.00716.48
7.3.240.0100.00716.39
7.3.230.0130.00316.38
7.3.210.0100.01016.34
7.3.200.0160.00316.25
7.3.190.0120.01216.39
7.3.180.0070.01416.37
7.3.170.0130.00316.54
7.3.160.0090.01416.75
7.3.120.0130.00614.91
7.3.110.0130.00714.86
7.3.100.0060.00914.78
7.3.90.0040.01414.54
7.3.80.0090.00714.85
7.3.70.0090.00214.57
7.3.60.0050.00814.80
7.3.50.0090.00514.72
7.3.40.0090.00714.67
7.3.30.0110.00614.83
7.3.20.0110.00715.72
7.3.10.0090.00815.79
7.3.00.0140.00215.77
7.2.330.0090.00916.43
7.2.320.0090.00916.65
7.2.310.0030.01316.50
7.2.300.0090.00916.63
7.2.290.0120.00616.60
7.2.250.0090.01214.79
7.2.240.0060.01315.05
7.2.230.0120.00314.77
7.2.220.0100.01014.88
7.2.210.0050.01315.01
7.2.200.0050.00914.93
7.2.190.0090.00514.76
7.2.180.0090.00915.05
7.2.170.0060.01014.93
7.2.160.0000.01714.97
7.2.150.0120.00615.01
7.2.140.0130.00615.08
7.2.130.0180.00415.06
7.2.120.0140.00415.10
7.2.110.0100.01015.08
7.2.100.0180.00714.92
7.2.90.0200.00615.18
7.2.80.0160.01014.75
7.2.70.0190.00315.19
7.2.60.0130.01614.98
7.2.50.0160.00315.04
7.2.40.0180.01115.21
7.2.30.0290.01014.86
7.2.20.0110.00715.00
7.2.10.0190.00015.09
7.2.00.0160.00314.85
7.1.330.0030.00915.81
7.1.320.0030.00616.03
7.1.310.0080.01015.10
7.1.300.0080.00814.93
7.1.290.0120.00615.00
7.1.280.0060.00914.62
7.1.270.0620.00814.90
7.1.260.0120.00314.87
7.1.250.0110.00713.78

preferences:
18.86 ms | 403 KiB | 5 Q