3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'a' => ['id' => 20, 'name' => 'chimpanzee'], 'b' => ['id' => 40, 'name' => 'meeting'], 'c' => ['id' => 20, 'name' => 'dynasty'], 'd' => ['id' => 50, 'name' => 'chocolate'], 'e' => ['id' => 10, 'name' => 'bananas'], 'f' => ['id' => 50, 'name' => 'fantasy'], 'g' => ['id' => 50, 'name' => 'football'] ]; asort($array); $result = []; array_walk( $array, function($row, $k) use (&$result) { $result[$row['id']][$k] = $row; } ); var_export($result);

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.4.120.0100.00923.98
8.4.110.0120.00821.65
8.4.100.0050.00518.92
8.4.90.0110.00920.42
8.4.80.0060.00220.43
8.4.70.0120.00817.90
8.4.60.0110.00818.89
8.4.50.0090.00918.58
8.4.40.0160.00319.38
8.4.30.0060.00918.81
8.4.20.0130.01022.47
8.4.10.0040.00423.67
8.3.250.0130.00718.77
8.3.240.0120.00617.23
8.3.230.0150.00516.92
8.3.220.0090.01018.97
8.3.210.0090.00818.35
8.3.200.0070.00116.56
8.3.190.0090.00717.48
8.3.180.0090.01017.09
8.3.170.0140.00420.71
8.3.160.0130.00418.43
8.3.150.0120.00316.96
8.3.140.0080.00018.85
8.3.130.0050.00318.50
8.3.120.0090.00020.71
8.3.110.0080.00320.94
8.3.100.0000.00916.79
8.3.90.0060.01016.65
8.3.80.0100.00016.63
8.3.70.0110.00716.63
8.3.60.0040.01216.38
8.3.50.0070.01416.43
8.3.40.0150.00020.47
8.3.30.0110.00718.68
8.3.20.0000.00724.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.290.0070.01020.53
8.2.280.0070.00318.27
8.2.270.0150.00317.17
8.2.260.0090.00016.59
8.2.250.0130.00317.38
8.2.240.0120.00317.27
8.2.230.0070.01022.58
8.2.220.0100.00724.06
8.2.210.0000.00826.77
8.2.200.0080.00318.29
8.2.190.0070.01416.63
8.2.180.0140.00418.16
8.2.170.0180.00418.94
8.2.160.0110.00322.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0030.00626.16
8.2.120.0040.00421.07
8.2.110.0080.00419.38
8.2.100.0080.00417.97
8.2.90.0070.00319.25
8.2.80.0000.00817.97
8.2.70.0030.00517.75
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0000.00918.33
8.2.30.0030.01017.82
8.2.20.0030.00618.42
8.2.10.0060.00717.59
8.2.00.0080.00517.63
8.1.330.0100.00822.14
8.1.320.0130.00715.81
8.1.310.0070.00018.26
8.1.300.0030.00618.54
8.1.290.0110.00018.88
8.1.280.0110.00725.92
8.1.270.0000.00824.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00421.25
8.1.230.0040.00817.45
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0050.00318.72
8.1.160.0060.00518.16
8.1.150.0080.00518.04
8.1.140.0090.00317.47
8.1.130.0080.00417.45
8.1.120.0090.00417.48
8.1.110.0110.00217.50
8.1.100.0140.00017.47
8.1.90.0110.00317.48
8.1.80.0100.00417.45
8.1.70.0070.00717.48
8.1.60.0070.00717.55
8.1.50.0080.00517.51
8.1.40.0060.00717.54
8.1.30.0100.00517.50
8.1.20.0030.01117.54
8.1.10.0110.00417.49
8.1.00.0030.01017.48
8.0.300.0000.00818.77
8.0.290.0020.00516.75
8.0.280.0100.00317.96
8.0.270.0080.00417.13
8.0.260.0080.00417.16
8.0.250.0080.00417.15
8.0.240.0050.00717.15
8.0.230.0050.00817.10
8.0.220.0060.00617.10
8.0.210.0100.00317.06
8.0.200.0060.01017.15
8.0.190.0100.00317.16
8.0.180.0110.00217.17
8.0.170.0090.00417.15
8.0.160.0080.00617.11
8.0.150.0100.00317.05
8.0.140.0110.00217.16
8.0.130.0080.00517.07
8.0.120.0080.00517.14
8.0.110.0100.00417.11
8.0.100.0080.00617.12
8.0.90.0090.00417.07
8.0.80.0080.00517.15
8.0.70.0110.00217.09
8.0.60.0100.00217.13
8.0.50.0080.00517.08
8.0.30.0050.00717.08
8.0.20.0060.00817.09
8.0.10.0100.00217.14

preferences:
32.43 ms | 403 KiB | 5 Q