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(current($keyTranslation)); $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.0150.00616.74
8.3.50.0160.00522.05
8.3.40.0040.01218.47
8.3.30.0070.00718.67
8.3.20.0040.00420.29
8.3.10.0040.00423.51
8.3.00.0000.00819.38
8.2.180.0140.00718.29
8.2.170.0140.00722.96
8.2.160.0130.00320.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00619.48
8.2.120.0030.00526.35
8.2.110.0030.00922.25
8.2.100.0000.01118.16
8.2.90.0030.00619.14
8.2.80.0080.00017.97
8.2.70.0090.00017.63
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0030.00519.52
8.2.30.0020.00520.64
8.2.20.0040.00417.66
8.2.10.0050.00318.04
8.2.00.0070.00018.17
8.1.280.0100.01025.92
8.1.270.0050.00523.91
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00422.66
8.1.230.0060.00617.53
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0060.00317.23
8.1.180.0070.00018.10
8.1.170.0030.00518.56
8.1.160.0040.00422.02
8.1.150.0030.00518.84
8.1.140.0040.00419.50
8.1.130.0000.00717.63
8.1.120.0000.00717.43
8.1.110.0000.00717.48
8.1.100.0040.00417.48
8.1.90.0040.00417.37
8.1.80.0040.00417.45
8.1.70.0070.00017.41
8.1.60.0060.00317.59
8.1.50.0080.00017.54
8.1.40.0040.00417.45
8.1.30.0030.00517.65
8.1.20.0040.00417.70
8.1.10.0090.00017.48
8.1.00.0000.00717.50
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0000.00717.27
8.0.260.0000.00717.14
8.0.250.0040.00416.99
8.0.240.0000.00916.91
8.0.230.0030.00416.93
8.0.220.0030.00316.96
8.0.210.0000.00716.83
8.0.200.0000.00616.81
8.0.190.0040.00417.04
8.0.180.0040.00416.94
8.0.170.0000.00816.88
8.0.160.0000.00716.89
8.0.150.0000.00716.73
8.0.140.0030.00416.84
8.0.130.0000.00613.36
8.0.120.0080.00016.88
8.0.110.0000.00716.79
8.0.100.0000.00717.01
8.0.90.0050.00216.71
8.0.80.0060.01216.92
8.0.70.0030.00516.89
8.0.60.0050.00216.79
8.0.50.0080.00016.76
8.0.30.0110.00616.99
8.0.20.0100.00917.40
8.0.10.0050.00316.89
8.0.00.0150.00216.66
7.4.330.0000.00516.69
7.4.320.0000.00616.52
7.4.300.0030.00316.46
7.4.290.0070.00016.49
7.4.280.0040.00416.60
7.4.270.0000.00716.62
7.4.260.0050.00316.61
7.4.250.0040.00416.59
7.4.240.0000.00716.41
7.4.230.0000.00716.51
7.4.220.0140.00416.69
7.4.210.0080.01016.59
7.4.200.0050.00216.52
7.4.160.0140.00016.41
7.4.150.0060.01217.40
7.4.140.0090.00917.86
7.4.130.0070.01116.51
7.4.120.0050.01216.47
7.4.110.0110.00816.51
7.4.100.0090.00916.49
7.4.90.0120.00616.61
7.4.80.0030.01519.39
7.4.70.0160.00016.60
7.4.60.0090.00616.56
7.4.50.0040.01416.61
7.4.40.0070.01016.48
7.4.30.0100.00716.58
7.4.00.0100.00615.02
7.3.330.0020.00213.38
7.3.320.0050.00013.25
7.3.310.0000.00716.42
7.3.300.0000.00716.22
7.3.290.0030.00316.33
7.3.280.0130.00816.37
7.3.270.0110.00717.40
7.3.260.0100.00716.36
7.3.240.0060.01116.29
7.3.230.0060.01216.39
7.3.210.0090.01216.50
7.3.200.0120.00616.35
7.3.190.0060.01216.43
7.3.180.0060.01116.31
7.3.170.0030.01716.41
7.3.160.0150.00016.58
7.3.10.0100.00516.60
7.3.00.0070.00716.75
7.2.330.0090.01316.48
7.2.320.0110.01216.73
7.2.310.0070.01016.45
7.2.300.0060.01216.55
7.2.290.0150.00616.50
7.2.130.0030.00916.88
7.2.120.0110.00416.87
7.2.110.0010.01016.85
7.2.100.0040.01016.95
7.2.90.0050.00616.70
7.2.80.0020.01216.89
7.2.70.0040.00716.86
7.2.60.0060.00616.90
7.2.50.0060.00316.87
7.2.40.0050.00816.98
7.2.30.0030.00716.82
7.2.20.0050.01216.78
7.2.10.0050.00817.07
7.2.00.0050.01017.65
7.1.250.0030.00715.72
7.1.200.0070.00715.80
7.1.100.0030.01018.41
7.1.70.0030.00617.16
7.1.60.0140.01019.48
7.1.50.0090.01217.07
7.1.00.0000.08022.40
7.0.200.0100.00514.85
7.0.60.0030.04019.86
7.0.50.0000.05017.88
7.0.40.0000.04720.32
7.0.30.0270.05320.21
7.0.20.0370.06320.26
7.0.10.0030.06020.16
7.0.00.0070.06720.24
5.6.280.0030.03021.13
5.6.210.0070.08320.65
5.6.200.0030.04018.22
5.6.190.0100.04020.63
5.6.180.0300.07020.50
5.6.170.0200.05720.45
5.6.160.0000.07020.76
5.6.150.0030.06718.16
5.6.140.0070.08318.14
5.6.130.0070.08318.12
5.6.120.0070.08720.96
5.6.110.0100.07720.89
5.6.100.0100.06721.03
5.6.90.0100.07021.07
5.6.80.0070.08020.39
5.5.350.4100.03720.34
5.5.340.0000.04017.98
5.5.330.0070.06020.35
5.5.320.0430.07320.27
5.5.310.0270.03720.34
5.5.300.0070.05017.98
5.5.290.0070.06718.04
5.5.280.0100.05320.96
5.5.270.0100.04320.79
5.5.260.0270.06320.80
5.5.250.0130.03020.47
5.5.240.0230.07020.26

preferences:
47.36 ms | 401 KiB | 5 Q