3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ ['a'=>'bla'], ['b'=>'test'], ['a'=>'foo'], ['c'=>'bar'] ]; $b = []; foreach ($a as $v) { $k = array_key_first($v); $b[$k][] = $v[$k]; } var_dump($b);

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.1.60.0060.00817.43
8.1.50.0040.00417.56
8.1.40.0070.00617.42
8.1.30.0080.00017.52
8.1.20.0040.00417.59
8.1.10.0000.00817.56
8.1.00.0030.00617.40
8.0.190.0040.00416.98
8.0.180.0030.00616.90
8.0.170.0030.00616.84
8.0.160.0030.00516.90
8.0.150.0000.00716.84
8.0.140.0040.00416.82
8.0.130.0050.00013.42
8.0.120.0040.00416.90
8.0.110.0040.00416.77
8.0.100.0000.00716.93
8.0.90.0000.00816.84
8.0.80.0100.01016.87
8.0.70.0000.00716.78
8.0.60.0080.00016.86
8.0.50.0040.00416.76
8.0.30.0090.00817.05
8.0.20.0070.01217.40
8.0.10.0080.00017.05
8.0.00.0110.00816.69
7.4.290.0030.00316.55
7.4.280.0000.00816.50
7.4.270.0070.00016.49
7.4.260.0040.00416.47
7.4.250.0030.00316.48
7.4.240.0030.00316.62
7.4.230.0040.00416.48
7.4.220.0050.00316.68
7.4.210.0080.00716.61
7.4.200.0070.00016.41
7.4.160.0120.00316.53
7.4.140.0140.00317.86
7.4.130.0000.02016.45
7.4.120.0060.01216.58
7.4.110.0080.00816.49
7.4.100.0140.01216.47
7.4.90.0130.00616.53
7.4.80.0120.01619.39
7.4.70.0030.01316.48
7.4.60.0130.00316.50
7.4.50.0000.01516.48
7.4.40.0040.01216.72
7.4.00.0030.00915.06
7.3.330.0000.00513.07
7.3.320.0000.00713.06
7.3.310.0000.00716.18
7.3.300.0040.00416.40
7.3.290.0070.00016.34
7.3.280.0080.00816.36
7.3.260.0080.01116.41
7.3.240.0110.00816.52
7.3.230.0150.00616.50
7.3.210.0080.00816.32
7.3.200.0170.00016.48
7.3.190.0050.01116.53
7.3.180.0030.01316.35
7.3.170.0090.00916.29
7.3.160.0150.00616.30
7.3.100.0060.00914.89
7.3.90.0090.01214.86
7.3.80.0080.00814.77
7.3.70.0000.01414.68
7.3.60.0060.00914.89
7.3.50.0130.00614.95
7.3.40.0110.00814.92
7.3.30.0090.01014.68
7.3.20.0030.01214.88
7.3.10.0300.00714.76
7.3.00.0260.00614.79
7.2.330.0100.00716.61
7.2.320.0160.00316.62
7.2.310.0000.01616.45
7.2.300.0080.00816.41
7.2.290.0080.00816.57
7.2.230.0040.01514.71
7.2.220.0060.01514.84
7.2.210.0060.00915.00
7.2.200.0130.00615.03
7.2.190.0090.00615.08
7.2.180.0070.01314.91
7.2.170.0060.01514.71
7.2.160.0070.00715.11
7.2.150.0070.01014.89
7.2.140.0130.00314.80
7.2.130.0200.00615.00
7.2.120.0250.00615.05
7.2.110.0190.00515.10
7.2.100.0240.00515.06
7.2.90.0230.00714.89
7.2.80.0220.00714.96
7.2.70.0240.01014.91
7.2.60.0290.00615.17
7.2.50.0210.01214.79
7.2.40.0250.00815.13
7.2.30.0260.00815.09
7.2.20.0370.01314.97
7.2.10.0300.00615.16
7.2.00.0790.00614.88
7.1.320.0150.00313.86
7.1.310.0040.01113.96
7.1.300.0110.00813.88
7.1.290.0100.00313.85
7.1.280.0120.00613.88
7.1.270.0110.00813.78
7.1.260.0070.00713.68
7.1.250.0140.01213.82
7.1.240.0110.00213.81
7.1.230.0030.01013.85
7.1.220.0060.00813.86
7.1.210.0140.00013.61
7.1.200.0060.00713.95
7.1.190.0040.00813.78
7.1.180.0000.01313.68
7.1.170.0060.00913.93
7.1.160.0100.00313.90
7.1.150.0100.00313.62
7.1.140.0040.00913.94
7.1.130.0060.00613.96
7.1.120.0090.00913.60
7.1.110.0090.00513.89
7.1.100.0120.00613.96
7.1.90.0170.00713.88
7.1.80.0070.00713.86
7.1.70.0040.01113.54
7.1.60.0070.00713.93
7.1.50.0000.01314.09
7.1.40.0070.00714.11
7.1.30.0090.00613.90
7.1.20.0030.01013.81
7.1.10.0160.00313.99
7.1.00.0100.00313.86
7.0.330.0130.00013.27
7.0.320.0100.01313.38
7.0.310.0060.00613.48
7.0.300.0110.00313.55
7.0.290.0100.00313.49
7.0.280.0030.01013.41
7.0.270.0040.00813.52
7.0.260.0080.00413.60
7.0.250.0050.00813.25
7.0.240.0030.00913.57
7.0.230.0130.00013.34
7.0.220.0060.00613.60
7.0.210.0080.00513.44
7.0.200.0090.00313.26
7.0.190.0070.01013.41
7.0.180.0130.00013.41
7.0.170.0030.01013.42
7.0.160.0090.00613.45
7.0.150.0060.00913.71
7.0.140.0070.00713.61
7.0.130.0180.00013.66
7.0.120.0060.01213.68
7.0.110.0100.00313.48
7.0.100.0090.00313.68
7.0.90.0000.01413.38
7.0.80.0120.00613.62
7.0.70.0070.00713.65
7.0.60.0030.01013.40
7.0.50.0200.01013.80
7.0.40.0070.00713.62
7.0.30.0030.01013.61
7.0.20.0060.00813.20
7.0.10.0090.00613.19
7.0.00.0050.01013.05
5.6.400.0080.00614.09
5.6.390.0070.00813.99
5.6.380.0130.00014.54
5.6.370.0220.00413.91
5.6.360.0100.01014.34
5.6.350.0120.01214.38
5.6.340.0170.00614.50
5.6.330.0160.00514.41
5.6.320.0150.00513.91
5.6.310.0120.00813.77
5.6.300.0160.00314.28
5.6.290.0150.00414.18
5.6.280.0180.00514.04
5.6.270.0150.00914.29
5.6.260.0120.00614.19
5.6.250.0150.00614.36
5.6.240.0160.00514.19
5.6.230.0160.00714.07
5.6.220.0120.00614.31
5.6.210.0110.00814.08
5.6.200.0070.01114.45
5.6.190.0090.01214.52
5.6.180.0110.00814.25
5.6.170.0110.00914.26
5.6.160.0170.00314.41
5.6.150.0190.00314.19
5.6.140.0150.00714.19
5.6.130.0080.01214.25
5.6.120.0100.01314.13
5.6.110.0160.00614.30
5.6.100.0150.00614.16
5.6.90.0100.01014.14
5.6.80.0120.00814.18
5.6.70.0130.00914.27
5.6.60.0140.00614.14
5.6.50.0090.00914.12
5.6.40.0140.00414.32
5.6.30.0160.00314.05
5.6.20.0140.00414.29
5.6.10.0150.00814.36
5.6.00.0180.00613.96
5.5.380.0170.00714.37
5.5.370.0130.01014.16
5.5.360.0190.00014.40
5.5.350.0080.01114.34
5.5.340.0150.00814.26
5.5.330.0180.00414.14
5.5.320.0230.00314.35
5.5.310.0080.01214.14
5.5.300.0160.00314.17
5.5.290.0170.00414.26
5.5.280.0190.00314.35
5.5.270.0160.00514.24
5.5.260.0080.01314.27
5.5.250.0130.00814.04
5.5.240.0240.00014.34
5.5.230.0230.00014.23
5.5.220.0210.00313.96
5.5.210.0150.00413.98
5.5.200.0090.01514.15
5.5.190.0150.00314.03
5.5.180.0070.01113.84
5.5.170.0100.01014.36
5.5.160.0110.01113.84
5.5.150.0070.01714.16
5.5.140.0140.00814.32
5.5.130.0170.00414.25
5.5.120.0190.00313.98
5.5.110.0130.00914.29
5.5.100.0140.00513.98
5.5.90.0000.02014.01
5.5.80.0220.00413.93
5.5.70.0200.01113.89
5.5.60.0190.01214.13
5.5.50.0090.01414.10
5.5.40.0220.00514.02
5.5.30.0120.01014.49
5.5.20.0190.00314.03
5.5.10.0150.00714.09
5.5.00.0100.01614.29
5.4.450.0120.00410.70
5.4.440.0090.00910.81
5.4.430.0120.00310.71
5.4.420.0110.00410.80
5.4.410.0150.00010.99
5.4.400.0070.00710.98
5.4.390.0110.00510.85
5.4.380.0070.00710.84
5.4.370.0070.00710.79
5.4.360.0160.00010.88
5.4.350.0130.00311.01
5.4.340.0110.00610.70
5.4.330.0060.00810.66
5.4.320.0090.00911.13
5.4.310.0110.00811.12
5.4.300.0040.01110.61
5.4.290.0100.00510.73
5.4.280.0130.00310.71
5.4.270.0130.00310.84
5.4.260.0090.00910.68
5.4.250.0140.00710.85
5.4.240.0080.00810.80
5.4.230.0180.00610.89
5.4.220.0160.00610.94
5.4.210.0140.00310.73
5.4.200.0150.00310.96
5.4.190.0170.00410.90
5.4.180.0190.00010.69
5.4.170.0130.00910.79
5.4.160.0200.00210.70
5.4.150.0140.00010.81
5.4.140.0140.00010.94
5.4.130.0120.00310.89
5.4.120.0140.00010.77
5.4.110.0040.00810.77
5.4.100.0060.00610.60
5.4.90.0130.00010.87
5.4.80.0050.00510.95
5.4.70.0060.00610.51
5.4.60.0050.00810.94
5.4.50.0060.00610.63
5.4.40.0080.00410.85
5.4.30.0040.00810.69
5.4.20.0000.01310.71
5.4.10.0040.00710.84
5.4.00.0080.00511.05
5.3.290.0030.01010.17
5.3.280.0100.00710.17
5.3.270.0080.00810.24
5.3.260.0110.00010.26
5.3.250.0070.00410.17
5.3.240.0040.00810.17
5.3.230.0100.00310.17
5.3.220.0080.00810.17
5.3.210.0080.00410.17
5.3.200.0000.01110.17
5.3.190.0110.00010.18
5.3.180.0070.00410.17
5.3.170.0030.00810.28
5.3.160.0060.00610.33
5.3.150.0110.00010.24
5.3.140.0050.00810.24
5.3.130.0040.00710.17
5.3.120.0100.00510.26
5.3.110.0060.00610.17
5.3.100.0080.00310.24
5.3.90.0120.00010.17
5.3.80.0070.00410.21
5.3.70.0070.00510.17
5.3.60.0100.00410.17
5.3.50.0120.00310.20
5.3.40.0030.01010.17
5.3.30.0060.00610.17
5.3.20.0050.00510.17
5.3.10.0080.00310.17
5.3.00.0050.00510.17
5.2.170.0000.01210.17
5.2.160.0060.00310.17
5.2.150.0060.00310.17
5.2.140.0030.00710.17
5.2.130.0110.00010.17
5.2.120.0080.00210.17
5.2.110.0040.00710.17
5.2.100.0030.00710.17
5.2.90.0050.00510.17
5.2.80.0050.00510.17
5.2.70.0070.00410.17
5.2.60.0100.00010.17
5.2.50.0040.00410.17
5.2.40.0020.00710.17
5.2.30.0100.00010.17
5.2.20.0080.00310.17
5.2.10.0060.00410.17
5.2.00.0100.00010.17
5.1.60.0070.00410.17
5.1.50.0050.00510.17
5.1.40.0100.00310.17
5.1.30.0030.00910.17
5.1.20.0050.00410.17
5.1.10.0000.00810.17
5.1.00.0100.00010.17
5.0.50.0020.00510.17
5.0.40.0070.00010.17
5.0.30.0040.00410.17
5.0.20.0000.00910.17
5.0.10.0070.00010.17
5.0.00.0070.00010.17
4.4.90.0040.00410.17
4.4.80.0000.00610.17
4.4.70.0000.00610.17
4.4.60.0060.00010.17
4.4.50.0050.00210.17
4.4.40.0000.00610.17
4.4.30.0000.00810.17
4.4.20.0000.00610.17
4.4.10.0030.00310.17
4.4.00.0030.00310.17
4.3.110.0000.00610.17
4.3.100.0050.00010.17
4.3.90.0060.00010.17
4.3.80.0060.00010.17
4.3.70.0030.00310.17
4.3.60.0040.00210.17
4.3.50.0000.00610.17
4.3.40.0000.00510.17
4.3.30.0020.00510.17
4.3.20.0030.00310.17
4.3.10.0000.00510.17
4.3.00.0080.00010.17

preferences:
53.5 ms | 406 KiB | 5 Q