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($keyTranslation[$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.0170.00316.75
8.3.50.0090.00822.11
8.3.40.0070.01018.97
8.3.30.0080.00818.82
8.3.20.0040.00420.18
8.3.10.0080.00023.52
8.3.00.0060.00319.38
8.2.180.0040.01418.42
8.2.170.0130.01022.96
8.2.160.0070.01320.30
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00317.50
8.2.120.0040.00426.35
8.2.110.0070.00422.07
8.2.100.0060.00618.04
8.2.90.0040.00419.26
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0080.00017.90
8.2.50.0090.00018.07
8.2.40.0030.00619.34
8.2.30.0050.00320.62
8.2.20.0000.01017.66
8.2.10.0060.00318.18
8.2.00.0050.00218.18
8.1.280.0100.00325.92
8.1.270.0000.00822.15
8.1.260.0040.00428.09
8.1.250.0050.00228.09
8.1.240.0000.00922.61
8.1.230.0040.00717.66
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0090.00017.23
8.1.180.0000.00918.10
8.1.170.0040.00418.64
8.1.160.0030.00322.11
8.1.150.0040.00418.94
8.1.140.0030.00519.55
8.1.130.0000.00717.69
8.1.120.0000.00717.45
8.1.110.0030.00517.40
8.1.100.0000.00717.39
8.1.90.0000.00717.39
8.1.80.0050.00317.33
8.1.70.0000.00717.41
8.1.60.0000.00917.63
8.1.50.0000.00917.54
8.1.40.0040.00417.49
8.1.30.0000.00817.66
8.1.20.0020.00517.66
8.1.10.0040.00417.48
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0070.00018.36
8.0.270.0000.00717.23
8.0.260.0030.00317.13
8.0.250.0050.00316.85
8.0.240.0020.00716.91
8.0.230.0040.00416.83
8.0.220.0000.00716.82
8.0.210.0000.00716.85
8.0.200.0000.00616.84
8.0.190.0080.00016.99
8.0.180.0050.00216.88
8.0.170.0050.00316.89
8.0.160.0050.00216.79
8.0.150.0000.00716.71
8.0.140.0030.00416.84
8.0.130.0000.00613.24
8.0.120.0040.00416.83
8.0.110.0000.00716.90
8.0.100.0000.00716.99
8.0.90.0000.00716.85
8.0.80.0090.00916.88
8.0.70.0000.00716.88
8.0.60.0000.00716.77
8.0.50.0070.00016.69
8.0.30.0060.01317.00
8.0.20.0100.00917.41
8.0.10.0040.00416.89
8.0.00.0120.00616.70
7.4.330.0020.00216.79
7.4.320.0030.00316.62
7.4.300.0000.00616.54
7.4.290.0030.00516.51
7.4.280.0030.00516.46
7.4.270.0030.00316.66
7.4.260.0000.00716.44
7.4.250.0070.00016.46
7.4.240.0000.00716.38
7.4.230.0040.00416.39
7.4.220.0040.01416.55
7.4.210.0050.01216.47
7.4.200.0030.00316.29
7.4.160.0080.00816.48
7.4.150.0110.00817.40
7.4.140.0100.01017.86
7.4.130.0080.01116.55
7.4.120.0070.01016.50
7.4.110.0060.01216.49
7.4.100.0070.01416.45
7.4.90.0140.00316.52
7.4.80.0100.01019.39
7.4.70.0160.00616.65
7.4.60.0090.00616.59
7.4.50.0030.01216.26
7.4.40.0060.00916.50
7.4.30.0100.00616.57
7.4.00.0100.00314.65
7.3.330.0030.00313.17
7.3.320.0030.00313.31
7.3.310.0030.00316.34
7.3.300.0000.00616.34
7.3.290.0060.00016.22
7.3.280.0040.01116.38
7.3.270.0060.01017.40
7.3.260.0130.00616.62
7.3.240.0090.00916.36
7.3.230.0140.00616.59
7.3.210.0030.01916.37
7.3.200.0060.00916.43
7.3.190.0100.01316.36
7.3.180.0150.00616.32
7.3.170.0100.01016.27
7.3.160.0070.01016.66
7.2.330.0080.01216.42
7.2.320.0030.02016.46
7.2.310.0030.01316.66
7.2.300.0080.00816.63
7.2.290.0070.01416.52
7.2.60.0030.01317.00
7.2.00.0060.00619.52
7.1.200.0000.01215.67
7.1.100.0040.00818.19
7.1.70.0000.00717.16
7.1.60.0110.01119.48
7.1.50.0070.00717.06
7.1.00.0130.06722.39
7.0.200.0280.00314.81
7.0.60.0000.04320.03
7.0.50.0070.08017.72
7.0.40.0070.05020.14
7.0.30.0200.04320.18
7.0.20.0400.07020.24
7.0.10.0070.05020.24
7.0.00.0130.08020.19
5.6.280.0030.07021.07
5.6.210.0030.06720.72
5.6.200.0030.04018.19
5.6.190.0100.06720.52
5.6.180.0330.06720.51
5.6.170.0330.08020.39
5.6.160.0000.05020.39
5.6.150.0030.08318.17
5.6.140.0100.06718.18
5.6.130.0070.05018.18
5.6.120.0100.05721.05
5.6.110.0130.08020.98
5.6.100.0070.08721.09
5.6.90.0030.06720.96
5.6.80.0030.08020.54
5.5.350.3130.03020.44
5.5.340.0070.03717.95
5.5.330.0070.08320.31
5.5.320.0030.09020.27
5.5.310.0170.04720.27
5.5.300.0070.04317.94
5.5.290.0070.05318.01
5.5.280.0030.09020.98
5.5.270.0170.07320.68
5.5.260.0170.07320.76
5.5.250.0170.07320.50
5.5.240.0300.06320.15

preferences:
39.12 ms | 401 KiB | 5 Q