3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'Test' => 1, 'OtherKey' => 2, ); $keyTranslation = array( 'OtherKey' => 'other_key', 'Test' => 'test', ); function test(&$arr, $keyTranslation) { foreach ($arr as $key => $value) { $arr[$keyTranslation[$key]] = $value; unset($arr[$key]); } } test($arr, $keyTranslation);

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.70.0210.00016.48
8.3.60.0210.00016.50
8.3.50.0110.00622.11
8.3.40.0100.00718.69
8.3.30.0070.01418.79
8.3.20.0080.00020.31
8.3.10.0080.00023.65
8.3.00.0050.00319.38
8.2.190.0110.00716.58
8.2.180.0090.00918.16
8.2.170.0170.00322.96
8.2.160.0100.00320.34
8.2.150.0080.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00017.50
8.2.120.0000.00826.35
8.2.110.0000.01020.52
8.2.100.0110.00418.16
8.2.90.0080.00019.35
8.2.80.0000.00817.97
8.2.70.0090.00017.75
8.2.60.0030.00618.05
8.2.50.0030.00518.07
8.2.40.0000.00819.23
8.2.30.0000.00720.63
8.2.20.0000.00917.81
8.2.10.0000.00818.16
8.2.00.0040.00418.18
8.1.280.0070.00725.92
8.1.270.0070.00321.98
8.1.260.0030.00528.09
8.1.250.0060.00328.09
8.1.240.0110.00022.14
8.1.230.0070.00717.65
8.1.220.0050.00317.76
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00918.81
8.1.160.0070.00021.90
8.1.150.0040.00418.80
8.1.140.0040.00419.63
8.1.130.0000.00717.75
8.1.120.0070.00017.36
8.1.110.0040.00417.49
8.1.100.0050.00317.46
8.1.90.0070.00017.46
8.1.80.0000.00717.47
8.1.70.0040.00417.27
8.1.60.0000.00817.48
8.1.50.0040.00417.59
8.1.40.0040.00417.51
8.1.30.0000.00817.70
8.1.20.0050.00217.55
8.1.10.0040.00417.59
8.1.00.0030.00717.56
8.0.300.0000.00818.77
8.0.290.0080.00016.75
8.0.280.0030.00318.55
8.0.270.0000.00717.26
8.0.260.0080.00017.26
8.0.250.0040.00416.98
8.0.240.0090.00017.02
8.0.230.0030.00316.86
8.0.220.0000.00816.85
8.0.210.0000.00716.96
8.0.200.0030.00316.92
8.0.190.0040.00416.98
8.0.180.0070.00016.82
8.0.170.0060.00316.81
8.0.160.0030.00516.79
8.0.150.0070.00016.91
8.0.140.0070.00016.84
8.0.130.0000.00713.28
8.0.120.0030.00516.79
8.0.110.0000.00716.82
8.0.100.0030.00516.75
8.0.90.0000.00716.71
8.0.80.0130.00316.96
8.0.70.0080.00016.68
8.0.60.0040.00416.96
8.0.50.0070.00016.89
8.0.30.0080.01117.08
8.0.20.0090.00917.40
8.0.10.0000.00716.89
8.0.00.0070.01116.69
7.4.330.0000.00516.74
7.4.320.0000.00616.59
7.4.300.0060.00016.60
7.4.290.0030.00316.56
7.4.280.0000.00816.52
7.4.270.0000.00716.43
7.4.260.0050.00216.42
7.4.250.0000.00716.45
7.4.240.0020.00516.63
7.4.230.0070.00016.32
7.4.220.0110.00716.71
7.4.210.0030.01016.54
7.4.200.0000.00716.54
7.4.160.0000.01616.64
7.4.150.0060.01017.40
7.4.140.0080.01317.86
7.4.130.0070.01216.70
7.4.120.0080.01016.54
7.4.110.0100.01016.48
7.4.100.0090.00916.40
7.4.90.0140.00316.47
7.4.80.0000.01719.39
7.4.70.0220.02316.54
7.4.60.0060.00916.66
7.4.50.0100.00316.53
7.4.40.0130.00916.41
7.4.30.0100.01016.52
7.4.00.0140.00315.18
7.3.330.0030.00313.36
7.3.320.0020.00213.22
7.3.310.0000.00716.42
7.3.300.0070.00016.19
7.3.290.0100.00816.34
7.3.280.0080.01116.37
7.3.270.0070.01117.40
7.3.260.0140.00316.30
7.3.250.0110.00716.52
7.3.240.0080.01016.63
7.3.230.0140.00416.64
7.3.210.0130.00716.57
7.3.200.0090.00616.38
7.3.190.0030.02016.45
7.3.180.0120.00316.49
7.3.170.0150.00616.59
7.3.160.0080.00816.41
7.3.10.0040.01116.48
7.3.00.0070.00716.66
7.2.330.0110.00716.73
7.2.320.0160.00916.76
7.2.310.0060.00916.66
7.2.300.0100.01216.69
7.2.290.0160.00716.77
7.2.130.0070.00316.96
7.2.120.0060.00916.91
7.2.110.0000.01516.97
7.2.100.0090.00316.82
7.2.90.0040.01117.07
7.2.80.0110.00316.80
7.2.70.0060.00317.06
7.2.60.0070.00816.89
7.2.50.0070.00717.00
7.2.40.0040.00717.07
7.2.30.0090.00617.04
7.2.20.0070.00716.70
7.2.10.0030.00916.91
7.2.00.0030.01218.20
7.1.250.0090.00415.85
7.1.200.0070.00715.80
7.1.70.0040.00417.21
7.1.60.0030.00717.38
7.1.50.0080.01516.70
7.1.00.0000.08022.28
7.0.200.0030.01316.69
7.0.100.0300.06719.93
7.0.90.0170.07319.94
7.0.80.0170.04319.99
7.0.70.0170.06719.86
7.0.60.0070.08320.02
7.0.50.0200.07320.29
7.0.40.0100.06720.19
7.0.30.0070.07719.92
7.0.20.0030.09020.12
7.0.10.0170.05319.99
7.0.00.0070.06320.16
5.6.280.0030.06021.03
5.6.250.0030.08020.70
5.6.240.0100.07320.67
5.6.230.0200.06320.51
5.6.220.0070.05320.48
5.6.210.0100.08320.75
5.6.200.0030.07021.11
5.6.190.0100.08021.08
5.6.180.0070.07721.18
5.6.170.0100.07721.09
5.6.160.0170.07321.03
5.6.150.0130.07320.95
5.6.140.0130.06720.95
5.6.130.0100.05020.95
5.6.120.0100.05021.02
5.6.110.0100.08021.05
5.6.100.0100.07721.04
5.6.90.0100.05020.93
5.6.80.0130.07320.41
5.6.70.0130.07020.46
5.6.60.0170.07320.43
5.6.50.0170.07320.45
5.6.40.0130.07020.49
5.6.30.0100.07320.48
5.6.20.0170.07020.44
5.6.10.0030.08320.30
5.6.00.0030.08320.39
5.5.380.0030.08320.39
5.5.370.0070.07320.42
5.5.360.0100.07020.49
5.5.350.0070.07720.43
5.5.340.0170.06720.89
5.5.330.0170.07320.73
5.5.320.0070.07720.77
5.5.310.0130.07020.92
5.5.300.0000.08720.80
5.5.290.0070.07720.91
5.5.280.0070.08020.78
5.5.270.0070.08720.93
5.5.260.0070.08020.87
5.5.250.0170.07320.70
5.5.240.0000.05320.27
5.5.230.0130.07320.27
5.5.220.0070.07720.28
5.5.210.0170.06020.12
5.5.200.0100.04320.27
5.5.190.0070.07020.18
5.5.180.0100.07720.23
5.5.160.0230.06020.21
5.5.150.0170.06720.28
5.5.140.0130.07320.08
5.5.130.0100.04020.21
5.5.120.0130.06320.23
5.5.110.0130.08020.26
5.5.100.0030.08720.08
5.5.90.0130.07020.17
5.5.80.0070.08020.07
5.5.70.0070.07319.93
5.5.60.0030.08020.13
5.5.50.0030.04020.04
5.5.40.0070.08020.07
5.5.30.0070.07720.14
5.5.20.0100.08019.96
5.5.10.0230.06020.00
5.5.00.0100.07020.07

preferences:
75.04 ms | 401 KiB | 5 Q