3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'Test' => 1, 'OtherKey' => 2 ); $keyTranslation = array( 'Test' => 'Test', 'OtherKey' => 'OtherKey' ); function test(&$arr, $keyTranslation) { foreach ($arr as $key => $value) { $arr[$keyTranslation[$key]] = $value; unset($arr[$key]); } } var_dump(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.0120.00916.75
8.3.50.0140.00521.99
8.3.40.0080.00818.77
8.3.30.0130.00318.71
8.3.20.0040.00420.34
8.3.10.0050.00323.71
8.3.00.0000.00819.13
8.2.180.0110.01116.50
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00017.63
8.2.120.0040.00426.35
8.2.110.0030.00620.39
8.2.100.0080.00418.05
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00419.36
8.2.30.0040.00420.57
8.2.20.0030.00617.73
8.2.10.0040.00418.13
8.2.00.0040.00418.14
8.1.280.0130.00625.92
8.1.270.0000.00821.88
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0120.00017.79
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0000.00917.22
8.1.190.0040.00817.38
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0040.00422.06
8.1.150.0040.00418.90
8.1.140.0070.00019.51
8.1.130.0030.00317.71
8.1.120.0040.00417.40
8.1.110.0040.00417.52
8.1.100.0000.00817.37
8.1.90.0000.00717.42
8.1.80.0000.00717.34
8.1.70.0030.00317.25
8.1.60.0040.00417.58
8.1.50.0040.00417.51
8.1.40.0030.00617.45
8.1.30.0080.00017.71
8.1.20.0060.00317.46
8.1.10.0040.00417.58
8.1.00.0050.00317.53
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.55
8.0.270.0000.00817.34
8.0.260.0030.00317.26
8.0.250.0040.00316.95
8.0.240.0030.00616.85
8.0.230.0000.00716.87
8.0.220.0000.00716.82
8.0.210.0000.00816.73
8.0.200.0000.00717.02
8.0.190.0050.00316.97
8.0.180.0000.00816.93
8.0.170.0040.00416.95
8.0.160.0030.00316.80
8.0.150.0000.00716.79
8.0.140.0050.00216.84
8.0.130.0050.00213.28
8.0.120.0040.00416.84
8.0.110.0000.00816.93
8.0.100.0000.00716.88
8.0.90.0040.00416.89
8.0.80.0030.01216.91
8.0.70.0050.00316.79
8.0.60.0000.00717.01
8.0.50.0000.00716.84
8.0.30.0120.00717.15
8.0.20.0150.00617.40
8.0.10.0050.00316.88
8.0.00.0100.00816.79
7.4.330.0000.00516.65
7.4.320.0030.00316.41
7.4.300.0000.00716.58
7.4.290.0030.00316.63
7.4.280.0040.00416.50
7.4.270.0070.00016.54
7.4.260.0000.00716.63
7.4.250.0040.00416.52
7.4.240.0040.00416.56
7.4.230.0030.00316.26
7.4.220.0100.01116.64
7.4.210.0060.01216.62
7.4.200.0000.00716.66
7.4.160.0110.00516.60
7.4.150.0150.00317.40
7.4.140.0080.00717.86
7.4.130.0100.01016.46
7.4.120.0070.00916.63
7.4.110.0070.01316.63
7.4.100.0130.01016.52
7.4.90.0090.00916.41
7.4.80.0030.01519.39
7.4.70.0140.00316.72
7.4.60.0060.00916.59
7.4.50.0130.00316.64
7.4.40.0070.01016.46
7.4.30.0080.00816.42
7.4.10.0130.00614.88
7.4.00.0100.00714.89
7.3.330.0000.00613.37
7.3.320.0030.00313.35
7.3.310.0030.00316.42
7.3.300.0070.00016.32
7.3.290.0100.00616.31
7.3.280.0080.00716.39
7.3.270.0090.00917.40
7.3.260.0130.00616.43
7.3.250.0070.01116.51
7.3.240.0050.01216.40
7.3.230.0030.01416.39
7.3.210.0120.00616.43
7.3.200.0130.00316.61
7.3.190.0150.00316.29
7.3.180.0130.00316.36
7.3.170.0100.00716.38
7.3.160.0090.00616.43
7.3.130.0040.01114.76
7.3.120.0040.01214.73
7.3.110.0120.00614.78
7.3.100.0040.01115.00
7.3.90.0070.01015.09
7.3.80.0000.01514.79
7.3.70.0000.01314.77
7.3.60.0100.00314.77
7.3.50.0030.01314.98
7.3.40.0060.01014.52
7.3.30.0100.00314.68
7.3.20.0090.00916.46
7.3.10.0030.01016.52
7.3.00.0100.00716.89
7.2.330.0110.00716.72
7.2.320.0060.01516.70
7.2.310.0060.01116.51
7.2.300.0120.00816.54
7.2.290.0070.01016.77
7.2.260.0100.00615.04
7.2.250.0070.01115.21
7.2.240.0040.01115.03
7.2.230.0030.01014.75
7.2.220.0110.00015.03
7.2.210.0110.00415.11
7.2.200.0000.01015.19
7.2.190.0040.00815.10
7.2.180.0040.01115.07
7.2.170.0060.00615.20
7.2.160.0070.01014.78
7.2.150.0060.01016.73
7.2.140.0060.01217.05
7.2.130.0100.00316.84
7.2.120.0000.01417.04
7.2.110.0120.00316.85
7.2.100.0070.00717.04
7.2.90.0140.00316.92
7.2.80.0030.01316.95
7.2.70.0080.00816.95
7.2.60.0060.00616.84
7.2.50.0000.01317.09
7.2.40.0060.00317.07
7.2.30.0090.00617.02
7.2.20.0090.00616.95
7.2.10.0090.00616.73
7.2.00.0080.00718.14
7.1.330.0000.01215.84
7.1.320.0060.00715.98
7.1.310.0040.00815.84
7.1.300.0070.00315.74
7.1.290.0000.01215.85
7.1.280.0030.01215.59
7.1.270.0000.01615.90
7.1.260.0070.01015.82
7.1.250.0060.00915.64
7.1.240.0040.00716.00
7.1.230.0070.00315.91
7.1.220.0070.00715.86
7.1.210.0060.00615.87
7.1.200.0050.00615.68
7.1.190.0040.00715.73
7.1.180.0000.01415.84
7.1.170.0000.01315.73
7.1.160.0110.00315.77
7.1.150.0000.01015.83
7.1.140.0070.00415.91
7.1.130.0030.01415.96
7.1.120.0030.00615.97
7.1.110.0000.01015.96
7.1.100.0020.01216.84
7.1.90.0030.01415.59
7.1.80.0030.00616.07
7.1.70.0070.00316.61
7.1.60.0080.01117.77
7.1.50.0080.01116.36
7.1.40.0000.01115.93
7.1.30.0130.00315.63
7.1.20.0030.01315.70
7.1.10.0030.01115.88
7.1.00.0050.04219.11
7.0.330.0060.00615.38
7.0.320.0030.01015.42
7.0.310.0040.00815.26
7.0.300.0100.00315.44
7.0.290.0050.00415.47
7.0.280.0000.01215.61
7.0.270.0000.01515.61
7.0.260.0040.00815.52
7.0.250.0070.00715.36
7.0.240.0060.00615.56
7.0.230.0040.00715.48
7.0.220.0040.00915.47
7.0.210.0040.01115.41
7.0.200.0210.00515.14
7.0.190.0030.01015.44
7.0.180.0070.00715.47
7.0.170.0040.01115.39
7.0.160.0060.01015.49
7.0.150.0040.00715.29
7.0.140.0100.00315.64
7.0.130.0100.00315.51
7.0.120.0110.00415.41
7.0.110.0130.00315.55
7.0.100.0000.01115.43
7.0.90.0050.00515.51
7.0.80.0070.00715.27
7.0.70.0100.00315.56
7.0.60.0080.04217.66
7.0.50.0020.02516.72
7.0.40.0040.04216.77
7.0.30.0120.02516.89
7.0.20.0140.02616.90
7.0.10.0100.03916.77
7.0.00.0070.03516.78
5.6.400.0060.01014.49
5.6.390.0030.01014.31
5.6.380.0000.01013.91
5.6.370.0060.00314.61
5.6.360.0110.00314.39
5.6.350.0140.00014.50
5.6.340.0070.00714.32
5.6.330.0080.00314.24
5.6.320.0040.00814.70
5.6.310.0100.00314.25
5.6.300.0030.01014.49
5.6.290.0030.00914.44
5.6.280.0000.02517.58
5.6.270.0040.01414.45
5.6.260.0030.01214.74
5.6.250.0000.00914.65
5.6.240.0080.00614.24
5.6.230.0030.01014.45
5.6.220.0070.00714.24
5.6.210.0130.02317.62
5.6.200.0060.02316.38
5.6.190.0100.03417.44
5.6.180.0170.03717.53
5.6.170.0170.02517.34
5.6.160.0020.03817.48
5.6.150.0070.02516.37
5.6.140.0070.02316.31
5.6.130.0070.04416.29
5.6.120.0070.02317.71
5.6.110.0050.04717.59
5.6.100.0120.02517.76
5.6.90.0050.04717.60
5.6.80.0070.03717.39
5.6.70.0030.01414.41
5.6.60.0100.00314.32
5.6.50.0070.01014.32
5.6.40.0110.00314.19
5.6.30.0030.01314.40
5.6.20.0030.01214.52
5.6.10.0090.00614.11
5.6.00.0060.00914.24
5.5.380.0030.00814.49
5.5.370.0030.01014.50
5.5.360.0060.00614.28
5.5.350.1790.02717.33
5.5.340.0060.03616.18
5.5.330.0030.03017.32
5.5.320.0280.04517.24
5.5.310.0170.04017.38
5.5.300.0060.03316.20
5.5.290.0040.03216.15
5.5.280.0020.02617.57
5.5.270.0070.02517.60
5.5.260.0120.03217.54
5.5.250.0080.03017.50
5.5.240.0150.04217.41
5.5.230.0070.01114.14
5.5.220.0070.01114.55
5.5.210.0070.00714.19
5.5.200.0080.00414.27
5.5.190.0040.01114.16
5.5.180.0030.00914.39
5.5.170.0000.01414.44
5.5.160.0060.00614.45
5.5.150.0000.01514.20
5.5.140.0040.01114.51
5.5.130.0070.01014.18
5.5.120.0070.00714.27
5.5.110.0060.00614.19
5.5.100.0070.00713.96
5.5.90.0150.00014.07
5.5.80.0070.00714.17
5.5.70.0030.00614.14
5.5.60.0080.00414.40
5.5.50.0030.00914.34
5.5.40.0030.01014.07
5.5.30.0100.00314.34
5.5.20.0090.00614.34
5.5.10.0090.00614.10
5.5.00.0120.00614.36

preferences:
50.76 ms | 401 KiB | 5 Q