3v4l.org

run code in 300+ PHP versions simultaneously
<?php $menu = [ (object)[ 'tid' => 24, 'name' => 'Sample', 'weight' => 3, 'depth' => 0 ], (object)[ 'tid' => 66, 'name' => 'Sample Subcategory', 'weight' => 0, 'depth' => 1 ], (object)[ 'tid' => 67, 'name' => 'Another Example', 'weight' => 1, 'depth' => 0 ], (object)[ 'tid' => 68, 'name' => 'Subcategory for Another Example', 'weight' => 1, 'depth' => 1 ], (object)[ 'tid' => 22, 'name' => 'A third example master category', 'weight' => 0, 'depth' => 0 ] ]; array_multisort(array_column($menu, 'depth'), array_column($menu, 'weight'), $menu); var_export($menu);

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.5.20.0090.00819.54
8.5.10.0120.00618.96
8.5.00.0170.00619.90
8.4.170.0150.00720.56
8.4.160.0150.01122.33
8.4.150.0020.00014.05
8.4.140.0120.00917.69
8.4.130.0040.00617.90
8.4.120.0120.00822.36
8.4.110.0130.00718.93
8.4.100.0150.00617.84
8.4.90.0120.00717.72
8.4.80.0090.00717.53
8.4.70.0090.00719.55
8.4.60.0130.00718.55
8.4.50.0140.00617.75
8.4.40.0110.00419.51
8.4.30.0060.00320.25
8.4.20.0130.00720.71
8.4.10.0030.00619.71
8.3.300.0130.00820.85
8.3.290.0140.00720.63
8.3.280.0140.00518.41
8.3.270.0140.00616.72
8.3.260.0060.00316.45
8.3.250.0150.00318.94
8.3.240.0140.00516.95
8.3.230.0120.00816.40
8.3.220.0140.00416.48
8.3.210.0120.00716.74
8.3.200.0060.00216.39
8.3.190.0120.00716.56
8.3.180.0060.00218.48
8.3.170.0060.00316.63
8.3.160.0090.01018.16
8.3.150.0070.01317.27
8.3.140.0100.00016.86
8.3.130.0040.00418.51
8.3.120.0060.00320.62
8.3.110.0030.00620.94
8.3.100.0070.01424.06
8.3.90.0090.00926.77
8.3.80.0000.00919.36
8.3.70.0180.00418.05
8.3.60.0070.00718.55
8.3.50.0150.00523.52
8.3.40.0110.00418.84
8.3.30.0040.01118.56
8.3.20.0000.00920.74
8.3.10.0040.00423.65
8.3.00.0050.00221.89
8.2.300.0070.00423.82
8.2.290.0110.00820.68
8.2.280.0110.00718.47
8.2.270.0130.00616.94
8.2.260.0140.00416.54
8.2.250.0150.00018.61
8.2.240.0000.00917.18
8.2.230.0000.00822.58
8.2.220.0080.00437.54
8.2.210.0100.00726.77
8.2.200.0030.00618.88
8.2.190.0140.00718.54
8.2.180.0030.01418.44
8.2.170.0140.00718.75
8.2.160.0140.00022.96
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00319.77
8.2.110.0040.00422.14
8.2.100.0110.00017.79
8.2.90.0030.00617.72
8.2.80.0040.00418.72
8.2.70.0000.00817.93
8.2.60.0000.00818.03
8.2.50.0000.00719.19
8.2.40.0060.00321.02
8.2.30.0000.00819.15
8.2.20.0040.00418.05
8.2.10.0040.00419.12
8.2.00.0040.00419.11
8.1.340.0110.01317.57
8.1.330.0100.00916.42
8.1.320.0110.00818.21
8.1.310.0080.00018.34
8.1.300.0000.00916.66
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0060.00320.74
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0050.00523.96
8.1.230.0100.00720.47
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.36
8.1.190.0060.00317.10
8.1.180.0030.00618.97
8.1.170.0030.00618.59
8.1.160.0000.00719.04
8.1.150.0030.00318.88
8.1.140.0040.00420.66
8.1.130.0000.00717.40
8.1.120.0070.00017.44
8.1.110.0030.00517.34
8.1.100.0000.00817.39
8.1.90.0030.00317.38
8.1.80.0030.00517.45
8.1.70.0030.00317.45
8.1.60.0030.00617.50
8.1.50.0030.00517.47
8.1.40.0030.00617.41
8.1.30.0060.00317.66
8.1.20.0030.00617.70
8.1.10.0000.00817.38
8.1.00.0000.00817.33
8.0.300.0070.00018.77
8.0.290.0090.00016.75
8.0.280.0070.00018.32
8.0.270.0100.00016.89
8.0.260.0000.00616.88
8.0.250.0030.00316.91
8.0.240.0000.00917.02
8.0.230.0020.00517.08
8.0.220.0070.00016.96
8.0.210.0040.00416.92
8.0.200.0000.00616.98
8.0.190.0000.01116.99
8.0.180.0000.00817.04
8.0.170.0000.01116.88
8.0.160.0070.00016.98
8.0.150.0040.00316.86
8.0.140.0040.00416.92
8.0.130.0060.00013.34
8.0.120.0040.00416.84
8.0.110.0030.00716.82
8.0.100.0080.00016.74
8.0.90.0030.00616.90
8.0.80.0050.01016.98
8.0.70.0040.00416.91
8.0.60.0000.00716.80
8.0.50.0080.00016.80
8.0.30.0030.01316.96
8.0.20.0100.01717.24
8.0.10.0040.00416.94
8.0.00.0100.01316.71
7.4.330.0000.00516.89
7.4.320.0000.00616.53
7.4.300.0070.00016.61
7.4.290.0080.00016.64
7.4.280.0040.00416.59
7.4.270.0030.00316.51
7.4.260.0050.00013.21
7.4.250.0070.00016.61
7.4.240.0070.00016.52
7.4.230.0030.00316.71
7.4.220.0030.00316.61
7.4.210.0090.00716.49
7.4.200.0040.00416.41
7.4.130.0110.01416.46
7.4.120.0070.01116.39
7.4.110.0060.01716.41
7.4.100.0060.01516.55
7.4.90.0060.01116.43
7.4.80.0100.00819.39
7.4.70.0030.01316.57
7.4.60.0030.01316.46
7.4.50.0090.00916.42
7.4.40.0030.01316.52
7.4.10.0040.01116.50
7.4.00.0030.01316.59
7.3.330.0030.00316.25
7.3.320.0000.00513.06
7.3.310.0000.00616.35
7.3.300.0000.00716.20
7.3.290.0070.00716.29
7.3.280.0110.00316.21
7.3.260.0070.01116.18
7.3.240.0080.00916.23
7.3.230.0070.01016.39
7.3.210.0030.01316.16
7.3.200.0040.01216.23
7.3.190.0060.01116.18
7.3.180.0030.01316.26
7.3.170.0060.01016.41
7.3.160.0060.00916.57
7.3.130.0120.00316.24
7.3.120.0030.01216.29
7.3.110.0160.00016.05
7.3.100.0090.00616.13
7.3.90.0120.00616.27
7.3.80.0000.01916.34
7.3.70.0070.00816.17
7.3.60.0040.01116.23
7.3.50.0090.00916.23
7.3.40.0070.01016.18
7.3.30.0100.00716.27
7.3.20.0000.02016.29
7.3.10.0100.01416.35
7.3.00.0060.00916.29
7.2.330.0090.00916.67
7.2.320.0140.00316.40
7.2.310.0090.00616.57
7.2.300.0030.01316.68
7.2.290.0090.00916.36
7.2.260.0140.00316.28
7.2.250.0080.00816.29
7.2.240.0060.01016.43
7.2.230.0130.00316.43
7.2.220.0090.00916.32
7.2.210.0060.01016.31
7.2.200.0140.00716.35
7.2.190.0030.01516.19
7.2.180.0030.01316.55
7.2.170.0040.01516.43
7.2.160.0100.00716.30
7.2.150.0030.01316.56
7.2.140.0040.01116.60
7.2.130.0030.01316.59
7.2.120.0090.00616.48
7.2.110.0120.00316.68
7.2.100.0000.01616.48
7.2.90.0140.00316.53
7.2.80.0100.01016.54
7.2.70.0040.01216.46
7.2.60.0150.00416.45
7.2.50.0130.00316.30
7.2.40.0100.00716.53
7.2.30.0120.00616.72
7.2.20.0070.01116.37
7.2.10.0030.01416.67
7.2.00.0110.00716.54

preferences:
161.45 ms | 403 KiB | 5 Q