3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'name' => 'Foo', 'children' => [ [ 'name' => 'B', 'children' => [] ], [ 'name' => 'A', 'children' => [] ] ] ], [ 'name' => 'Bar', 'children' => [ [ 'name' => 'Z', 'children' => [] ], [ 'name' => 'X', 'children' => [] ], [ 'name' => 'Y', 'children' => [] ] ] ] ]; usort($array, $f = function(&$x, &$y) use (&$f){ usort($x['children'], $f); usort($y['children'], $f); var_dump($x['children']); return strcasecmp($x['name'], $y['name']); }); var_dump($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.3.60.0110.00716.63
8.3.50.0110.00821.08
8.3.40.0110.00418.96
8.3.30.0110.00418.92
8.3.20.0050.00220.16
8.3.10.0040.00423.55
8.3.00.0040.00423.61
8.2.180.0070.01016.88
8.2.170.0060.00922.96
8.2.160.0070.00720.43
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00619.86
8.2.120.0060.00326.35
8.2.110.0100.00021.09
8.2.100.0090.00318.04
8.2.90.0080.00019.35
8.2.80.0050.00318.05
8.2.70.0070.00317.75
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0090.00022.27
8.2.30.0030.00619.52
8.2.20.0000.00817.74
8.2.10.0040.00418.14
8.2.00.0030.00517.98
8.1.280.0090.00625.92
8.1.270.0120.00623.87
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0080.00322.60
8.1.230.0060.00619.07
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0030.00517.23
8.1.180.0060.00318.10
8.1.170.0000.00818.49
8.1.160.0050.00220.73
8.1.150.0070.00018.88
8.1.140.0050.00319.63
8.1.130.0000.00717.71
8.1.120.0040.00717.52
8.1.110.0050.00317.29
8.1.100.0030.00517.39
8.1.90.0050.00317.48
8.1.80.0030.00517.42
8.1.70.0070.00017.44
8.1.60.0040.00417.57
8.1.50.0040.00417.42
8.1.40.0040.00417.39
8.1.30.0060.00317.62
8.1.20.0040.00417.53
8.1.10.0030.00517.56
8.1.00.0000.00817.57
8.0.300.0040.00418.77
8.0.290.0050.00316.63
8.0.280.0030.00318.44
8.0.270.0000.00717.36
8.0.260.0000.00617.14
8.0.250.0000.00717.03
8.0.240.0040.00417.00
8.0.230.0000.00717.06
8.0.220.0040.00417.00
8.0.210.0000.00816.83
8.0.200.0030.00316.93
8.0.190.0000.00716.96
8.0.180.0040.00416.96
8.0.170.0000.00817.03
8.0.160.0000.00716.93
8.0.150.0000.00717.00
8.0.140.0040.00416.88
8.0.130.0000.00613.46
8.0.120.0000.00816.79
8.0.110.0040.00416.93
8.0.100.0050.00316.92
8.0.90.0040.00416.96
8.0.80.0080.00816.88
8.0.70.0040.00416.89
8.0.60.0080.00016.80
8.0.50.0030.00516.90
8.0.30.0050.01317.09
8.0.20.0130.00817.40
8.0.10.0050.00216.98
8.0.00.0110.01216.74
7.4.330.0030.00316.70
7.4.320.0030.00316.44
7.4.300.0000.00716.49
7.4.290.0070.00316.59
7.4.280.0030.00616.51
7.4.270.0030.00316.61
7.4.260.0040.00416.57
7.4.250.0000.00716.55
7.4.240.0070.00016.50
7.4.230.0040.00416.63
7.4.220.0040.01516.53
7.4.210.0100.01016.62
7.4.200.0030.00316.66
7.4.160.0080.01416.45
7.4.150.0140.01417.40
7.4.140.0120.01017.86
7.4.130.0120.00916.47
7.4.120.0090.00916.59
7.4.110.0070.01116.39
7.4.100.0110.00716.48
7.4.90.0070.01316.32
7.4.80.0120.00919.39
7.4.70.0030.01416.69
7.4.60.0120.00816.45
7.4.50.0030.01216.48
7.4.40.0120.00616.45
7.4.30.0120.00616.45
7.4.10.0090.00914.58
7.4.00.0100.00614.99
7.3.330.0030.00313.23
7.3.320.0000.00613.32
7.3.310.0040.00416.36
7.3.300.0040.00416.25
7.3.290.0070.00016.38
7.3.280.0120.00716.43
7.3.270.0080.01217.40
7.3.260.0100.01416.52
7.3.240.0120.01116.41
7.3.230.0000.01816.48
7.3.210.0100.00716.45
7.3.200.0120.00819.39
7.3.190.0040.01816.39
7.3.180.0160.00316.42
7.3.170.0090.00916.36
7.3.160.0090.01216.41
7.3.130.0090.00915.06
7.3.120.0160.00314.86
7.3.110.0120.00614.80
7.3.100.0040.01414.93
7.3.90.0060.00615.03
7.3.80.0040.00815.06
7.3.70.0060.00914.64
7.3.60.0060.00914.80
7.3.50.0050.00514.80
7.3.40.0150.00014.71
7.3.30.0060.00914.93
7.3.20.0070.00316.66
7.3.10.0130.00016.66
7.3.00.0060.00916.64
7.2.330.0030.01616.71
7.2.320.0150.01616.39
7.2.310.0070.01016.40
7.2.300.0160.00616.69
7.2.290.0070.01116.68
7.2.260.0060.01214.98
7.2.250.0130.01015.13
7.2.240.0060.00614.95
7.2.230.0060.01014.68
7.2.220.0060.00914.96
7.2.210.0040.01114.86
7.2.200.0040.01114.85
7.2.190.0060.01015.06
7.2.180.0090.00015.20
7.2.170.0070.00314.66
7.2.160.0110.00615.00
7.2.150.0030.01016.76
7.2.140.0070.01016.60
7.2.130.0070.00716.95
7.2.120.0040.00816.94
7.2.110.0150.00316.96
7.2.100.0040.00916.69
7.2.90.0100.00317.00
7.2.80.0070.00416.54
7.2.70.0070.01116.87
7.2.60.0110.01116.78
7.2.50.0030.01216.42
7.2.40.0000.00916.59
7.2.30.0040.00916.49
7.2.20.0030.01416.99
7.2.10.0070.00717.13
7.2.00.0050.00918.11
7.1.330.0030.00715.94
7.1.320.0030.01015.81
7.1.310.0030.00616.05
7.1.300.0080.00515.70
7.1.290.0060.00615.80
7.1.280.0070.00715.78
7.1.270.0100.00315.79
7.1.260.0060.01015.84
7.1.250.0040.01115.75
7.1.240.0030.01015.61
7.1.230.0060.00315.52
7.1.220.0060.00915.98
7.1.210.0070.00715.78
7.1.200.0040.00715.70
7.1.190.0030.00615.80
7.1.180.0120.00315.56
7.1.170.0060.00615.72
7.1.160.0060.00315.67
7.1.150.0030.01315.82
7.1.140.0120.00015.88
7.1.130.0030.01015.89
7.1.120.0090.00315.70
7.1.110.0070.01015.75
7.1.100.0050.00416.79
7.1.90.0070.00715.82
7.1.80.0000.01015.84
7.1.70.0020.00716.47
7.1.60.0080.01117.44
7.1.50.0090.00716.24
7.1.40.0110.00015.81
7.1.30.0080.00415.76
7.1.20.0090.00415.84
7.1.10.0070.01015.88
7.1.00.0050.04319.27
7.0.330.0000.01415.38
7.0.320.0080.00415.36
7.0.310.0080.00515.09
7.0.300.0090.00415.45
7.0.290.0070.00715.41
7.0.280.0030.01315.38
7.0.270.0060.00615.41
7.0.260.0060.01015.19
7.0.250.0110.00315.32
7.0.240.0000.01315.43
7.0.230.0060.00915.35
7.0.220.0030.00715.41
7.0.210.0000.01215.37
7.0.200.0010.00715.92
7.0.190.0040.00415.12
7.0.180.0060.00615.19
7.0.170.0030.01015.48
7.0.160.0000.01115.58
7.0.150.0050.00515.07
7.0.140.0000.01715.38
7.0.130.0060.00715.31
7.0.120.0030.01415.46
7.0.110.0040.00415.44
7.0.100.0000.01415.49
7.0.90.0040.01115.52
7.0.80.0000.01215.63
7.0.70.0060.00615.34
7.0.60.0060.04218.50
7.0.50.0090.04316.61
7.0.40.0070.04316.83
7.0.30.0180.03916.84
7.0.20.0150.04116.86
7.0.10.0030.02716.79
7.0.00.0060.03816.72
5.6.400.0070.00714.32
5.6.390.0040.00714.52
5.6.380.0090.00614.73
5.6.370.0070.00714.71
5.6.360.0070.00414.27
5.6.350.0100.00714.72
5.6.340.0070.01014.54
5.6.330.0100.00614.74
5.6.320.0050.00514.54
5.6.310.0030.01013.93
5.6.300.0040.00914.45
5.6.290.0000.01014.04
5.6.280.0020.02217.70
5.6.270.0100.00314.18
5.6.260.0060.00314.49
5.6.250.0070.00713.95
5.6.240.0100.00014.34
5.6.230.0070.00314.27
5.6.220.0070.00314.27
5.6.210.0120.03817.45
5.6.200.0130.03816.28
5.6.190.0030.04917.64
5.6.180.0150.02917.49
5.6.170.0170.03017.59
5.6.160.0100.04317.38
5.6.150.0050.03716.30
5.6.140.0070.03516.23
5.6.130.0100.03816.33
5.6.120.0040.03417.57
5.6.110.0060.04717.61
5.6.100.0040.02917.61
5.6.90.0080.02817.54
5.6.80.0080.04017.44
5.6.70.0030.01014.21
5.6.60.0030.00614.16
5.6.50.0060.00613.83
5.6.40.0000.01314.20
5.6.30.0030.00914.21
5.6.20.0030.01314.35
5.6.10.0090.00314.41
5.6.00.0030.00714.31
5.5.380.0050.00314.41
5.5.370.0100.00014.28
5.5.360.0030.00613.93
5.5.350.0050.02517.41
5.5.340.0030.04016.06
5.5.330.0050.04317.25
5.5.320.0150.02517.44
5.5.310.0100.02517.34
5.5.300.0080.03516.09
5.5.290.0030.04615.97
5.5.280.0090.02917.67
5.5.270.0050.04717.32
5.5.260.0060.05017.36
5.5.250.0050.04517.47
5.5.240.0110.03817.13
5.5.230.0070.00714.36
5.5.220.0110.00014.33
5.5.210.0070.00413.99
5.5.200.0060.00314.02
5.5.190.0030.00714.07
5.5.180.0120.00314.26
5.5.170.0060.00914.59
5.5.160.0040.00814.38
5.5.150.0000.01314.43
5.5.140.0060.00914.02
5.5.130.0000.00913.72
5.5.120.0070.00314.18
5.5.110.0070.00714.21
5.5.100.0030.00613.97
5.5.90.0090.00614.32
5.5.80.0080.00614.18
5.5.70.0070.01014.13
5.5.60.0070.01114.20
5.5.50.0090.00014.11
5.5.40.0000.01313.76
5.5.30.0100.00713.90
5.5.20.0150.00314.39
5.5.10.0090.00413.90
5.5.00.0100.00314.09

preferences:
57.35 ms | 401 KiB | 5 Q