3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 2 => [ 'position' => 0, 'children' => [ 3 => ['position' => "375"], 5 => ['position' => "44"], 6 => ['position' => "567"], 9 => [ 'position' => "12", 'children' => [ 74 => ['position' => "2"], 76 => ['position' => "3"], 77 => ['position' => "1"], ] ], 62 => ['position' => "34"], 63 => ['position' => "11"], 66 => ['position' => "114"], 74 => ['position' => "912"], 76 => ['position' => "4564"], ] ] ]; function recur(&$data): void { uasort($data, fn($a, $b) => $a['position'] <=> $b['position']); foreach($data as &$value){ if (isset($value['children'])) { recur($value['children']); } } } recur($array); var_export($array);

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.00.0120.01620.11
8.4.150.0020.00114.05
8.4.140.0110.01117.59
8.4.130.0130.00717.95
8.4.120.0130.00820.61
8.4.110.0130.00722.34
8.4.100.0140.00817.44
8.4.90.0130.00718.79
8.4.80.0100.01017.97
8.4.70.0040.00418.00
8.4.60.0130.00718.85
8.4.50.0140.00618.69
8.4.40.0180.00319.56
8.4.30.0200.00020.53
8.4.20.0000.00922.48
8.4.10.0000.01923.77
8.3.280.0120.00818.33
8.3.270.0130.00816.86
8.3.260.0090.01016.95
8.3.250.0120.00718.81
8.3.240.0120.00716.77
8.3.230.0090.01116.68
8.3.220.0050.00317.30
8.3.210.0130.00816.54
8.3.200.0050.00316.50
8.3.190.0120.00517.41
8.3.180.0130.00717.16
8.3.170.0120.00618.99
8.3.160.0080.00617.18
8.3.150.0110.00717.19
8.3.140.0070.01116.73
8.3.130.0060.00318.29
8.3.120.0000.00920.68
8.3.110.0030.00520.94
8.3.100.0040.00416.85
8.3.90.0110.00026.77
8.3.80.0030.00616.50
8.3.70.0110.00718.30
8.3.60.0120.00316.50
8.3.50.0040.01116.40
8.3.40.0080.00320.38
8.3.30.0070.01418.73
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.290.0160.00320.38
8.2.280.0120.00716.61
8.2.270.0070.00017.39
8.2.260.0070.01116.45
8.2.250.0050.00318.43
8.2.240.0030.00517.05
8.2.230.0030.00622.58
8.2.220.0030.00624.06
8.2.210.0090.00926.77
8.2.200.0060.00318.26
8.2.190.0070.00716.58
8.2.180.0060.00916.88
8.2.170.0120.00918.75
8.2.160.0060.00922.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00020.39
8.2.110.0000.01021.00
8.2.100.0080.00317.84
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0050.00319.78
8.2.50.0000.00818.07
8.2.40.0000.00819.94
8.2.30.0000.00818.17
8.2.20.0000.00719.21
8.2.10.0120.00517.66
8.2.00.0110.00717.75
8.1.330.0140.00422.00
8.1.320.0110.00816.11
8.1.310.0030.01416.66
8.1.300.0130.00720.33
8.1.290.0070.00430.84
8.1.280.0070.01025.92
8.1.270.0080.00024.66
8.1.260.0080.00026.35
8.1.250.0070.00428.09
8.1.240.0030.00621.27
8.1.230.0090.00317.57
8.1.220.0080.00017.77
8.1.210.0000.00918.77
8.1.200.0090.00017.24
8.1.190.0050.00317.23
8.1.180.0040.00421.99
8.1.170.0080.00018.90
8.1.160.0020.00518.97
8.1.150.0050.00218.60
8.1.140.0050.00517.31
8.1.130.0090.00017.39
8.1.120.0030.00617.48
8.1.110.0070.00217.52
8.1.100.0000.01017.50
8.1.90.0050.00517.49
8.1.80.0060.00617.54
8.1.70.0080.00317.61
8.1.60.0000.00919.36
8.1.50.0070.00219.20
8.1.40.0090.00419.41
8.1.30.0080.00419.48
8.1.20.0040.00819.31
8.1.10.0070.00519.30
8.1.00.0110.00019.18
8.0.300.0050.00218.77
8.0.290.0050.00216.63
8.0.280.0030.00318.36
8.0.270.0000.01216.70
8.0.260.0080.00416.73
8.0.250.0060.00616.88
8.0.240.0120.00016.88
8.0.230.0000.01216.88
8.0.220.0100.00216.66
8.0.210.0000.01116.64
8.0.200.0040.00516.79
8.0.190.0050.00516.88
8.0.180.0050.00516.85
8.0.170.0060.00316.86
8.0.160.0080.00016.84
8.0.150.0020.00716.78
8.0.140.0090.00216.66
8.0.130.0000.01216.80
8.0.120.0070.00316.73
8.0.110.0070.00216.85
8.0.100.0090.00316.77
8.0.90.0130.00316.70
8.0.80.0140.00516.91
8.0.70.0000.01616.82
8.0.60.0050.01016.80
8.0.50.0150.00016.77
8.0.30.0070.00616.76
8.0.20.0160.00016.86
8.0.10.0170.00016.81
7.4.330.0050.00516.30
7.4.320.0100.00217.01
7.4.00.0030.00817.20
7.3.330.0060.00417.14
7.3.320.0120.00017.17
7.3.230.0100.00516.30
7.2.340.0150.00116.30

preferences:
136.93 ms | 403 KiB | 5 Q