3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arX = Array('AAA' => 173.696, 'BBB' => 72.436, 'CCC' => 142.692); $arY = Array('AAA' => 127, 'DDD' => 72.333); $newArray = []; $callback = function($value, $key , $prefix) use (&$newArray) { if (!array_key_exists ($key , $newArray)) { $newArray[$key] = []; } $newArray[$key] += [$prefix => $value]; }; array_walk($arX , $callback , "X"); array_walk($arY , $callback , "Y"); var_dump($newArray);

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.130.0040.00418.23
8.3.120.0150.00418.84
8.3.110.0060.00320.94
8.3.100.0110.00724.06
8.3.90.0110.00726.77
8.3.80.0060.00318.55
8.3.70.0060.00916.58
8.3.60.0180.00018.43
8.3.50.0110.00618.09
8.3.40.0080.00818.98
8.3.30.0100.01018.82
8.3.20.0030.00719.15
8.3.10.0070.00723.46
8.3.00.0060.00320.70
8.2.250.0050.00316.61
8.2.240.0080.00018.92
8.2.230.0030.00522.58
8.2.220.0100.00037.54
8.2.210.0050.00326.77
8.2.200.0060.00318.54
8.2.190.0090.00916.58
8.2.180.0140.00325.92
8.2.170.0140.00322.96
8.2.160.0140.00021.15
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00422.29
8.2.120.0040.00426.35
8.2.110.0060.00321.04
8.2.100.0040.00817.91
8.2.90.0000.00817.84
8.2.80.0030.00519.11
8.2.70.0030.00517.63
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0040.00418.06
8.2.30.0000.00818.20
8.2.20.0000.00718.19
8.2.10.0040.00418.05
8.2.00.0040.00419.55
8.1.300.0030.00518.09
8.1.290.0060.00330.84
8.1.280.0100.00725.92
8.1.270.0070.01021.91
8.1.260.0140.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00523.96
8.1.230.0080.00320.95
8.1.220.0000.00817.75
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0090.00018.66
8.1.160.0000.00818.84
8.1.150.0000.00918.86
8.1.140.0000.00718.96
8.1.130.0000.00817.50
8.1.120.0000.00717.37
8.1.110.0000.00717.48
8.1.100.0000.00817.38
8.1.90.0040.00417.37
8.1.80.0040.00417.52
8.1.70.0000.00717.48
8.1.60.0060.00317.57
8.1.50.0000.00817.60
8.1.40.0040.00417.53
8.1.30.0000.00817.58
8.1.20.0040.00417.68
8.1.10.0030.00617.66
8.1.00.0000.00717.49
8.0.300.0040.00420.10
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0040.00416.95
8.0.260.0000.00716.88
8.0.250.0000.00716.93
8.0.240.0040.00417.02
8.0.230.0000.00817.01
8.0.220.0070.00016.98
8.0.210.0000.00716.96
8.0.200.0050.00216.90
8.0.190.0040.00417.01
8.0.180.0080.00016.91
8.0.170.0030.00617.02
8.0.160.0050.00216.92
8.0.150.0000.00916.95
8.0.140.0000.00716.80
8.0.130.0000.00613.40
8.0.120.0040.00416.82
8.0.110.0050.00216.85
8.0.100.0040.00416.87
8.0.90.0040.00416.93
8.0.80.0050.01116.93
8.0.70.0070.00016.93
8.0.60.0040.00416.84
8.0.50.0040.00416.91
8.0.30.0080.00817.14
8.0.20.0100.01217.40
8.0.10.0000.00717.05
8.0.00.0110.00816.54
7.4.330.0040.00015.55
7.4.320.0060.00016.47
7.4.300.0030.00316.60
7.4.290.0050.00216.50
7.4.280.0000.00716.49
7.4.270.0000.00716.40
7.4.260.0070.00016.63
7.4.250.0080.00016.51
7.4.240.0070.00016.55
7.4.230.0000.00716.36
7.4.220.0040.00416.36
7.4.210.0050.01116.53
7.4.200.0030.00316.54
7.4.160.0080.01016.48
7.4.140.0140.00617.86
7.4.130.0180.00616.48
7.4.120.0130.00816.52
7.4.110.0170.00016.45
7.4.100.0150.00916.51
7.4.90.0080.01116.53
7.4.80.0080.01119.39
7.4.70.0120.00616.61
7.4.60.0060.01316.57
7.4.50.0100.00716.59
7.4.40.0060.01216.60
7.4.10.0060.01314.91
7.4.00.0030.01214.98
7.3.330.0000.00513.37
7.3.320.0070.00013.38
7.3.310.0070.00016.41
7.3.300.0070.00016.25
7.3.290.0000.00816.38
7.3.280.0090.00716.35
7.3.260.0100.01416.32
7.3.240.0070.01116.35
7.3.230.0140.00316.54
7.3.210.0170.00716.55
7.3.200.0060.01216.51
7.3.190.0060.00916.39
7.3.180.0100.00716.51
7.3.170.0060.00916.49
7.3.160.0000.01616.28
7.3.130.0060.01514.76
7.3.120.0070.00715.03
7.3.110.0000.01614.56
7.3.100.0030.00914.79
7.3.90.0130.00314.85
7.3.80.0090.00014.57
7.3.70.0000.01014.98
7.3.60.0040.01214.88
7.3.50.0120.00314.63
7.3.40.0030.01014.87
7.3.30.0040.00814.90
7.3.20.0000.01416.81
7.3.10.0060.00616.69
7.3.00.0080.00616.57
7.2.330.0080.01016.44
7.2.320.0120.00616.38
7.2.310.0030.01416.52
7.2.300.0130.00316.74
7.2.290.0100.00616.27
7.2.260.0110.00714.98
7.2.250.0000.01514.76
7.2.240.0030.01314.80
7.2.230.0040.00815.13
7.2.220.0100.00615.10
7.2.210.0070.00715.07
7.2.200.0040.01115.19
7.2.190.0060.01314.72
7.2.180.0110.00415.15
7.2.170.0000.01514.95
7.2.160.0030.01414.98
7.2.150.0000.01616.61
7.2.140.0110.00316.66
7.2.130.0050.00716.75
7.2.120.0050.00916.48
7.2.110.0080.00916.45
7.2.100.0050.00816.80
7.2.90.0090.00916.91
7.2.80.0810.00816.05
7.2.70.0760.00816.21
7.2.60.0490.00516.04
7.2.50.0510.00616.14
7.2.40.0500.00715.98
7.2.30.0470.00916.09
7.2.20.0400.00316.19
7.2.10.0230.00916.11
7.2.00.0170.00916.09
7.1.330.0040.01115.92
7.1.320.0060.00315.81
7.1.310.0120.00415.78
7.1.300.0060.00915.44
7.1.290.0030.00615.45
7.1.280.0030.01015.95
7.1.270.0070.00315.52
7.1.260.0100.00315.84
7.1.250.0070.00815.75
7.1.240.0040.00915.82
7.1.230.0030.00615.69
7.1.220.0030.01215.86
7.1.210.0070.01115.70
7.1.200.0500.00614.79
7.1.190.0740.01014.75
7.1.180.0560.00814.79
7.1.170.0760.01014.84
7.1.160.0690.00814.83
7.1.150.0780.00514.75
7.1.140.0050.01014.71
7.1.130.0080.00714.75
7.1.120.0350.00614.87
7.1.110.0080.01014.89
7.1.100.0840.00814.74
7.1.90.0030.01014.75
7.1.80.1130.00714.71
7.1.70.0070.00814.66
7.1.60.0890.01023.52
7.1.50.0180.01423.35
7.1.40.1120.00523.68
7.1.30.0170.00623.55
7.1.20.0130.01123.43
7.1.10.0600.00614.73
7.1.00.0110.00414.61
7.0.330.0060.00915.16
7.0.320.0090.00615.49
7.0.310.0030.01015.56
7.0.300.0030.00715.31
7.0.290.0040.00815.45
7.0.280.0070.00415.51
7.0.270.0080.00415.57
7.0.260.0000.01715.51
7.0.250.0040.01115.26
7.0.240.0060.00615.46
7.0.230.0070.00715.20
7.0.220.0030.00615.57
7.0.210.0030.01015.48
7.0.200.0000.01215.10
7.0.190.0060.00615.52
7.0.180.0090.00315.30
7.0.170.0000.01215.52
7.0.160.0060.00615.57
7.0.150.0090.00015.45
7.0.140.0090.00315.59
7.0.130.0070.00315.50
7.0.120.0070.00315.42
7.0.110.0070.00315.30
7.0.100.0030.00715.21
7.0.90.0030.01015.54
7.0.80.0060.00315.42
7.0.70.0070.00715.59
7.0.60.0040.00415.51
7.0.50.0080.00815.35
7.0.40.0040.00813.43
7.0.30.0040.00713.66
7.0.20.0120.00313.50
7.0.10.0090.00313.48
7.0.00.0060.00613.31
5.6.400.0000.01014.39
5.6.390.0030.01314.22
5.6.380.0040.01514.26
5.6.370.0120.00314.35
5.6.360.0070.00714.46
5.6.350.0090.00614.36
5.6.340.0000.01414.22
5.6.330.0100.00314.57
5.6.320.0070.00714.73
5.6.310.0070.01114.09
5.6.300.0030.01014.50
5.6.290.0060.00314.56
5.6.280.0030.00714.84
5.6.270.0030.01014.56
5.6.260.0040.00714.26
5.6.250.0030.00614.34
5.6.240.0030.01214.38
5.6.230.0100.00314.18
5.6.220.0130.00014.18
5.6.210.0030.01014.18
5.6.200.0070.01014.32
5.6.190.0070.01014.41
5.6.180.0100.00314.32
5.6.170.0070.00714.03
5.6.160.0080.00014.19
5.6.150.0030.01014.10
5.6.140.0140.00414.70
5.6.130.0060.00914.45
5.6.120.0040.00814.35
5.6.110.0040.01114.34
5.6.100.0030.01314.38
5.6.90.0060.00614.02
5.6.80.0100.00614.00
5.6.70.0060.01014.07
5.6.60.0070.01014.24
5.6.50.0060.00914.20
5.6.40.0030.00614.55
5.6.30.0060.00314.13
5.6.20.0090.00014.07
5.6.10.0080.00414.24
5.6.00.0030.01014.39

preferences:
29.13 ms | 403 KiB | 5 Q