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); var_export( array_reduce( array_keys($array), function($result, $k) use ($array) { $result[$array[$k]['id']][$k] = $array[$k]; return $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.3.60.0150.00018.55
8.3.50.0070.01416.48
8.3.40.0000.01420.29
8.3.30.0080.00818.76
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0040.00426.16
8.2.180.0110.00425.92
8.2.170.0100.01019.14
8.2.160.0080.00622.96
8.2.150.0050.00225.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.92
8.2.110.0040.00421.09
8.2.100.0070.00317.85
8.2.90.0040.00418.34
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00417.63
8.2.50.0000.00817.75
8.2.40.0000.00919.42
8.2.30.0060.00318.10
8.2.20.0060.00319.38
8.2.10.0070.00017.76
8.2.00.0070.00317.76
8.1.280.0110.00325.92
8.1.270.0030.00622.19
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00422.19
8.1.230.0120.00020.97
8.1.220.0040.00417.74
8.1.210.0040.00419.80
8.1.200.0030.00517.75
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.54
8.1.160.0000.00818.90
8.1.150.0080.00018.69
8.1.140.0000.00717.39
8.1.130.0000.00817.44
8.1.120.0000.00917.49
8.1.110.0090.00017.45
8.1.100.0040.00417.36
8.1.90.0040.00417.38
8.1.80.0050.00217.46
8.1.70.0000.00817.46
8.1.60.0000.00717.57
8.1.50.0030.00617.53
8.1.40.0030.00617.67
8.1.30.0040.00417.60
8.1.20.0050.00317.53
8.1.10.0000.00817.48
8.1.00.0040.00417.35
8.0.300.0040.00720.06
8.0.290.0040.00416.75
8.0.280.0030.00318.47
8.0.270.0000.00716.77
8.0.260.0040.00416.65
8.0.250.0070.00016.69
8.0.240.0060.00316.77
8.0.230.0050.00316.71
8.0.220.0000.00816.68
8.0.210.0000.00816.85
8.0.200.0030.00316.77
8.0.190.0040.00416.85
8.0.180.0040.00416.83
8.0.170.0070.00016.75
8.0.160.0040.00416.86
8.0.150.0030.00316.75
8.0.140.0080.00016.79
8.0.130.0050.00316.71
8.0.120.0040.00416.73
8.0.110.0050.00316.75
8.0.100.0030.00516.75
8.0.90.0000.00816.63
8.0.80.0040.00416.64
8.0.70.0000.00816.81
8.0.60.0040.00416.73
8.0.50.0050.00316.68
8.0.30.0000.00716.73
8.0.20.0050.00316.83
8.0.10.0000.00816.81

preferences:
45.38 ms | 400 KiB | 5 Q