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) { var_dump($key); $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.60.0140.00716.75
8.3.50.0170.00521.99
8.3.40.0090.00618.54
8.3.30.0070.00718.88
8.3.20.0060.00320.02
8.3.10.0040.00423.64
8.3.00.0080.00019.50
8.2.180.0140.00718.54
8.2.170.0120.00322.96
8.2.160.0070.00720.38
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0030.00717.63
8.2.120.0050.00226.35
8.2.110.0040.00719.21
8.2.100.0090.00317.91
8.2.90.0030.00619.40
8.2.80.0000.00817.97
8.2.70.0050.00317.75
8.2.60.0080.00018.03
8.2.50.0050.00318.07
8.2.40.0000.00819.46
8.2.30.0000.00720.50
8.2.20.0090.00017.68
8.2.10.0000.00818.12
8.2.00.0040.00417.99
8.1.280.0070.00725.92
8.1.270.0000.01023.84
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0070.00423.97
8.1.230.0120.00017.64
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0080.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00418.72
8.1.160.0050.00222.01
8.1.150.0040.00418.88
8.1.140.0000.00819.57
8.1.130.0000.00717.76
8.1.120.0000.00717.50
8.1.110.0000.00717.43
8.1.100.0040.00417.45
8.1.90.0070.00017.48
8.1.80.0040.00417.42
8.1.70.0000.00717.32
8.1.60.0050.00317.54
8.1.50.0000.00817.42
8.1.40.0080.00017.49
8.1.30.0030.00617.56
8.1.20.0040.00417.47
8.1.10.0090.00017.53
8.1.00.0000.00717.43
8.0.300.0080.00018.77
8.0.290.0000.00816.63
8.0.280.0040.00418.46
8.0.270.0030.00317.23
8.0.260.0070.00017.20
8.0.250.0050.00216.97
8.0.240.0090.00016.82
8.0.230.0000.00716.91
8.0.220.0000.00716.81
8.0.210.0000.00716.78
8.0.200.0030.00316.95
8.0.190.0000.00816.95
8.0.180.0040.00416.91
8.0.170.0030.00516.89
8.0.160.0050.00216.87
8.0.150.0080.00016.76
8.0.140.0030.00316.84
8.0.130.0090.00013.32
8.0.120.0020.00516.73
8.0.110.0040.00416.86
8.0.100.0000.00816.82
8.0.90.0050.00316.95
8.0.80.0110.00716.95
8.0.70.0050.00216.76
8.0.60.0050.00216.69
8.0.50.0040.00416.77
8.0.30.0100.01216.95
8.0.20.0120.00817.40
8.0.10.0000.00717.00
8.0.00.0080.01116.76
7.4.330.0000.00516.78
7.4.320.0030.00316.61
7.4.300.0060.00016.58
7.4.290.0030.00616.50
7.4.280.0000.00816.48
7.4.270.0040.00416.59
7.4.260.0000.00716.50
7.4.250.0050.00216.47
7.4.240.0010.00616.58
7.4.230.0070.00016.53
7.4.220.0110.00616.62
7.4.210.0010.01516.62
7.4.200.0050.00316.70
7.4.160.0110.00416.64
7.4.150.0090.01217.40
7.4.140.0120.00917.86
7.4.130.0110.00716.38
7.4.120.0110.00616.53
7.4.110.0100.00716.52
7.4.100.0080.01116.61
7.4.90.0100.01316.40
7.4.80.0140.00419.39
7.4.70.0100.00716.58
7.4.60.0100.00716.47
7.4.50.0030.01016.33
7.4.40.0040.01616.60
7.4.30.0060.01616.49
7.4.10.0090.00915.69
7.4.00.0050.01115.43
7.3.330.0000.00513.30
7.3.320.0050.00013.35
7.3.310.0000.00716.25
7.3.300.0030.00316.22
7.3.290.0030.00316.23
7.3.280.0130.00516.37
7.3.270.0050.01117.40
7.3.260.0130.00616.58
7.3.250.0070.01016.52
7.3.240.0120.00716.31
7.3.230.0140.00416.63
7.3.210.0030.01316.45
7.3.200.0120.00416.52
7.3.190.0090.01216.49
7.3.180.0060.01016.53
7.3.170.0110.01116.52
7.3.160.0060.00916.31
7.3.130.0060.01215.55
7.3.120.0070.01215.20
7.3.110.0110.00615.24
7.3.100.0070.00815.23
7.3.90.0060.00715.21
7.3.80.0020.01115.24
7.3.70.0050.00815.25
7.3.60.0090.00515.25
7.3.50.0070.00715.15
7.3.40.0040.01015.19
7.3.30.0040.00915.23
7.3.20.0060.00917.09
7.3.10.0050.01117.06
7.3.00.0050.00617.08
7.2.330.0110.00616.45
7.2.320.0180.00616.71
7.2.310.0090.00616.57
7.2.300.0110.00616.40
7.2.290.0090.01316.79
7.2.260.0100.00815.89
7.2.250.0090.01015.64
7.2.240.0030.01015.44
7.2.230.0040.01115.42
7.2.220.0060.00915.39
7.2.210.0060.00815.31
7.2.200.0080.00715.36
7.2.190.0040.01215.38
7.2.180.0050.01015.38
7.2.170.0060.00715.34
7.2.160.0100.00715.45
7.2.150.0110.00517.21
7.2.140.0050.00617.22
7.2.130.0050.00917.15
7.2.120.0070.00917.35
7.2.110.0060.00717.27
7.2.100.0040.01017.21
7.2.90.0060.00617.33
7.2.80.0060.00817.40
7.2.70.0040.00817.31
7.2.60.0050.00717.24
7.2.50.0060.00817.17
7.2.40.0080.00817.35
7.2.30.0040.01017.41
7.2.20.0060.00617.27
7.2.10.0080.00617.22
7.2.00.0040.00917.69
7.1.330.0090.00716.17
7.1.320.0090.00716.17
7.1.310.0060.00716.29
7.1.300.0040.00916.25
7.1.290.0030.00916.17
7.1.280.0030.00816.30
7.1.270.0050.00916.21
7.1.260.0020.01216.19
7.1.250.0090.00416.19
7.1.240.0070.00616.22
7.1.230.0070.00516.34
7.1.220.0030.01016.23
7.1.210.0070.00416.35
7.1.200.0050.00816.22
7.1.190.0080.00516.11
7.1.180.0020.00616.33
7.1.170.0060.00716.16
7.1.160.0040.01116.42
7.1.150.0060.00716.36
7.1.140.0050.00716.27
7.1.130.0070.00916.30
7.1.120.0060.00716.32
7.1.110.0070.00716.38
7.1.100.0070.00516.82
7.1.90.0050.00816.29
7.1.80.0070.00716.14
7.1.70.0050.00716.46
7.1.60.0070.00917.17
7.1.50.0070.00816.49
7.1.40.0030.00916.27
7.1.30.0040.00916.22
7.1.20.0070.00716.25
7.1.10.0070.00716.28
7.1.00.0040.02617.84
7.0.330.0050.00715.92
7.0.320.0070.00715.88
7.0.310.0020.01015.91
7.0.300.0080.00816.06
7.0.290.0030.00915.91
7.0.280.0020.01115.82
7.0.270.0080.00615.91
7.0.260.0060.00915.96
7.0.250.0060.00815.99
7.0.240.0050.00815.98
7.0.230.0040.01015.99
7.0.220.0060.00615.97
7.0.210.0090.00515.86
7.0.200.0070.00915.70
7.0.190.0040.00715.87
7.0.180.0080.00615.97
7.0.170.0070.00516.12
7.0.160.0060.00415.99
7.0.150.0040.00815.96
7.0.140.0040.01015.89
7.0.130.0050.00715.93
7.0.120.0080.00416.04
7.0.110.0050.00816.03
7.0.100.0040.00915.85
7.0.90.0030.00916.01
7.0.80.0100.00515.92
7.0.70.0050.00715.92
7.0.60.0060.02516.87
7.0.50.0100.02116.41
7.0.40.0090.01515.49
7.0.30.0110.02215.51
7.0.20.0150.02215.58
7.0.10.0100.02515.49
7.0.00.0080.02115.56
5.6.400.0040.01014.93
5.6.390.0080.00714.92
5.6.380.0080.00315.02
5.6.370.0090.00615.05
5.6.360.0070.00814.99
5.6.350.0110.00414.77
5.6.340.0060.00614.88
5.6.330.0070.00714.96
5.6.320.0020.01115.13
5.6.310.0050.00915.12
5.6.300.0020.01215.00
5.6.290.0100.00415.10
5.6.280.0050.02316.51
5.6.270.0030.01315.08
5.6.260.0060.00615.11
5.6.250.0070.00714.98
5.6.240.0040.01115.07
5.6.230.0060.00715.06
5.6.220.0070.00714.84
5.6.210.0110.02216.36
5.6.200.0060.02315.68
5.6.190.0060.01816.29
5.6.180.0100.02316.30
5.6.170.0120.02516.38
5.6.160.0060.02616.40
5.6.150.0070.02515.73
5.6.140.0050.02615.74
5.6.130.0040.01715.71
5.6.120.0050.02716.55
5.6.110.0050.01816.40
5.6.100.0100.02616.48
5.6.90.0050.02216.56
5.6.80.0070.02416.27
5.6.70.0080.00614.87
5.6.60.0050.00914.91
5.6.50.0120.00314.90
5.6.40.0030.00914.96
5.6.30.0040.01014.95
5.6.20.0030.01114.88
5.6.10.0020.01314.74
5.6.00.0060.00914.87
5.5.380.0050.00814.87
5.5.370.0040.00914.82
5.5.360.0060.00714.79
5.5.350.0760.01816.21
5.5.340.0070.01815.67
5.5.330.0100.02116.37
5.5.320.0150.02216.19
5.5.310.0090.02016.37
5.5.300.0060.02815.69
5.5.290.0070.02015.67
5.5.280.0060.02016.19
5.5.270.0030.02016.33
5.5.260.0070.02316.22
5.5.250.0040.01616.25
5.5.240.0150.01816.11
5.5.230.0030.01214.68
5.5.220.0070.00714.89
5.5.210.0050.00914.82
5.5.200.0040.00814.78
5.5.190.0050.00814.68
5.5.180.0040.01014.80
5.5.170.0050.01114.66
5.5.160.0050.01014.91
5.5.150.0060.00814.95
5.5.140.0080.00614.84
5.5.130.0050.00914.74
5.5.120.0060.01014.93
5.5.110.0090.00314.82
5.5.100.0080.00814.83
5.5.90.0060.01114.62
5.5.80.0090.00714.70
5.5.70.0090.00614.77
5.5.60.0050.00814.87
5.5.50.0020.01114.77
5.5.40.0050.00814.63
5.5.30.0100.00314.93
5.5.20.0050.00914.79
5.5.10.0050.00714.59
5.5.00.0050.00914.76

preferences:
60.37 ms | 401 KiB | 5 Q