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, &$array){ usort($x['children'], $f); usort($y['children'], $f); var_dump($x['children'], $array); return strcasecmp($x['name'], $y['name']); });

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.0130.00616.88
8.3.50.0120.00721.20
8.3.40.0120.00318.82
8.3.30.0090.00618.88
8.3.20.0040.00420.18
8.3.10.0090.00023.63
8.3.00.0040.00423.53
8.2.180.0160.00318.29
8.2.170.0080.00822.96
8.2.160.0000.01820.52
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.82
8.2.120.0050.00326.35
8.2.110.0040.00721.18
8.2.100.0080.00418.16
8.2.90.0000.00819.21
8.2.80.0030.00618.04
8.2.70.0060.00317.63
8.2.60.0060.00317.91
8.2.50.0050.00318.07
8.2.40.0040.00422.32
8.2.30.0040.00419.48
8.2.20.0040.00417.89
8.2.10.0030.00518.10
8.2.00.0080.00018.14
8.1.280.0130.00325.92
8.1.270.0090.00023.99
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0100.00022.59
8.1.230.0090.00319.01
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00717.35
8.1.190.0050.00317.25
8.1.180.0030.00618.10
8.1.170.0030.00618.45
8.1.160.0000.00820.89
8.1.150.0000.00718.91
8.1.140.0080.00019.51
8.1.130.0030.00617.61
8.1.120.0110.00017.38
8.1.110.0030.00517.54
8.1.100.0070.00017.54
8.1.90.0030.00617.36
8.1.80.0030.00617.38
8.1.70.0040.00417.55
8.1.60.0000.01017.59
8.1.50.0030.00617.57
8.1.40.0000.00817.52
8.1.30.0040.00417.60
8.1.20.0030.00517.58
8.1.10.0080.00017.60
8.1.00.0050.00317.44
8.0.300.0000.00818.77
8.0.290.0080.00016.75
8.0.280.0040.00418.38
8.0.270.0000.00717.34
8.0.260.0030.00317.14
8.0.250.0030.00316.89
8.0.240.0040.00416.91
8.0.230.0000.00816.92
8.0.220.0040.00416.86
8.0.210.0000.00816.98
8.0.200.0030.00316.90
8.0.190.0040.00416.92
8.0.180.0030.00516.98
8.0.170.0050.00316.98
8.0.160.0000.00717.01
8.0.150.0050.00216.89
8.0.140.0060.00316.90
8.0.130.0000.00613.43
8.0.120.0060.00316.90
8.0.110.0030.00516.93
8.0.100.0000.00816.86
8.0.90.0070.00016.97
8.0.80.0100.01017.02
8.0.70.0000.00716.87
8.0.60.0000.00716.87
8.0.50.0040.00416.88
8.0.30.0100.01017.29
8.0.20.0150.01117.40
8.0.10.0000.00817.14
8.0.00.0130.01116.84
7.4.330.0030.00316.66
7.4.320.0040.00416.47
7.4.300.0040.00416.45
7.4.290.0060.00316.42
7.4.280.0060.00316.61
7.4.270.0070.00016.66
7.4.260.0040.00416.52
7.4.250.0040.00416.58
7.4.240.0040.00416.58
7.4.230.0070.00016.32
7.4.220.0100.02016.70
7.4.210.0100.00816.56
7.4.200.0040.00416.37
7.4.160.0170.00216.47
7.4.150.0180.00517.40
7.4.140.0130.01217.86
7.4.130.0160.00816.57
7.4.120.0100.01416.65
7.4.110.0130.00616.63
7.4.100.0100.01016.43
7.4.90.0120.01016.61
7.4.80.0180.00719.39
7.4.70.0140.01116.40
7.4.60.0130.01016.48
7.4.50.0070.01016.41
7.4.40.0150.00516.45
7.4.30.0140.01116.29
7.4.10.0030.01615.14
7.4.00.0030.01014.70
7.3.330.0000.00513.33
7.3.320.0000.00513.44
7.3.310.0000.00716.34
7.3.300.0030.00616.24
7.3.290.0000.00716.39
7.3.280.0100.00916.34
7.3.270.0090.01217.40
7.3.260.0180.00916.63
7.3.240.0110.01116.53
7.3.230.0120.00816.43
7.3.210.0090.01216.32
7.3.200.0060.01919.39
7.3.190.0080.01216.44
7.3.180.0090.01216.40
7.3.170.0070.01016.42
7.3.160.0040.01516.45
7.3.130.0070.01415.14
7.3.120.0030.01614.97
7.3.110.0030.01714.90
7.3.100.0030.01014.70
7.3.90.0070.00715.00
7.3.80.0040.01514.79
7.3.70.0040.01114.84
7.3.60.0030.01414.82
7.3.50.0060.00914.84
7.3.40.0110.00714.93
7.3.30.0030.01214.79
7.3.20.0110.00316.39
7.3.10.0120.00616.49
7.3.00.0070.00716.26
7.2.330.0130.00716.48
7.2.320.0130.01016.44
7.2.310.0090.01016.54
7.2.300.0100.01016.65
7.2.290.0050.01316.58
7.2.260.0210.00014.89
7.2.250.0030.01714.98
7.2.240.0120.00614.93
7.2.230.0090.00914.86
7.2.220.0080.00615.16
7.2.210.0040.01514.88
7.2.200.0060.00815.03
7.2.190.0060.00914.82
7.2.180.0040.01114.63
7.2.170.0030.01114.88
7.2.160.0110.00314.84
7.2.150.0060.00317.08
7.2.140.0090.00316.89
7.2.130.0090.00716.65
7.2.120.0080.00616.56
7.2.110.0120.00716.60
7.2.100.0110.00816.84
7.2.90.0080.00916.58
7.2.80.0120.00816.77
7.2.70.0120.00716.68
7.2.60.0110.00916.71
7.2.50.0070.01116.72
7.2.40.0120.00816.73
7.2.30.0070.00616.61
7.2.20.0100.00816.72
7.2.10.0100.00816.65
7.2.00.0090.00917.09
7.1.330.0070.01115.61
7.1.320.0110.00415.86
7.1.310.0120.00015.71
7.1.300.0030.01015.79
7.1.290.0040.01515.75
7.1.280.0050.00515.82
7.1.270.0030.00715.49
7.1.260.0070.01015.93
7.1.250.0110.00715.61
7.1.240.0040.00915.88
7.1.230.0020.01015.70
7.1.220.0070.00715.83
7.1.210.0050.01215.82
7.1.200.0030.01015.76
7.1.190.0060.00915.69
7.1.180.0020.01215.84
7.1.170.0050.00615.79
7.1.160.0090.00515.84
7.1.150.0030.00715.57
7.1.140.0050.00715.70
7.1.130.0050.00515.71
7.1.120.0070.00515.76
7.1.110.0030.01015.72
7.1.100.0080.00716.46
7.1.90.0060.00615.84
7.1.80.0090.00215.69
7.1.70.0060.00716.12
7.1.60.0030.01616.97
7.1.50.0060.01016.22
7.1.40.0020.01115.77
7.1.30.0100.00315.72
7.1.20.0000.01315.86
7.1.10.0050.01015.68
7.1.00.0080.02918.07
7.0.330.0080.00315.24
7.0.320.0110.00215.35
7.0.310.0020.00915.31
7.0.300.0070.00415.26
7.0.290.0050.00715.31
7.0.280.0040.00815.45
7.0.270.0030.00615.38
7.0.260.0020.01115.35
7.0.250.0010.01115.52
7.0.240.0050.00715.30
7.0.230.0030.00815.44
7.0.220.0050.00715.34
7.0.210.0100.00515.39
7.0.200.0030.00915.76
7.0.190.0060.00715.39
7.0.180.0030.01115.37
7.0.170.0090.00515.33
7.0.160.0040.00515.29
7.0.150.0070.00515.41
7.0.140.0080.00515.39
7.0.130.0070.00315.46
7.0.120.0040.00915.45
7.0.110.0090.00515.40
7.0.100.0040.00915.47
7.0.90.0030.01015.44
7.0.80.0060.00615.35
7.0.70.0060.00715.15
7.0.60.0040.03317.53
7.0.50.0070.01716.17
7.0.40.0060.02615.58
7.0.30.0130.03215.64
7.0.20.0120.02715.63
7.0.10.0090.03215.72
7.0.00.0100.03315.65
5.6.400.0100.00714.25
5.6.390.0030.00914.24
5.6.380.0060.00814.39
5.6.370.0040.00914.53
5.6.360.0110.00014.21
5.6.350.0070.00514.09
5.6.340.0060.00814.48
5.6.330.0060.00514.46
5.6.320.0080.00614.35
5.6.310.0080.00914.42
5.6.300.0050.01014.36
5.6.290.0080.00714.20
5.6.280.0050.02116.45
5.6.270.0020.01114.14
5.6.260.0080.00614.56
5.6.250.0050.01014.60
5.6.240.0080.00614.51
5.6.230.0050.00714.39
5.6.220.0080.00614.35
5.6.210.0090.02916.32
5.6.200.0040.02515.68
5.6.190.0060.03116.43
5.6.180.0120.02316.39
5.6.170.0200.02516.39
5.6.160.0040.03416.45
5.6.150.0040.03615.65
5.6.140.0050.02715.70
5.6.130.0040.03315.47
5.6.120.0030.03516.45
5.6.110.0100.03116.53
5.6.100.0060.02116.52
5.6.90.0100.01816.63
5.6.80.0090.02816.49
5.6.70.0080.00614.35
5.6.60.0070.00714.32
5.6.50.0110.00214.23
5.6.40.0070.00914.13
5.6.30.0010.00914.35
5.6.20.0080.00614.18
5.6.10.0080.00614.23
5.6.00.0110.00614.23
5.5.380.0100.00312.66
5.5.370.0070.00312.79
5.5.360.0050.00712.78
5.5.350.1100.01315.26
5.5.340.0070.02614.55
5.5.330.0070.02015.24
5.5.320.0140.02215.26
5.5.310.0090.03615.26
5.5.300.0070.02814.35
5.5.290.0050.02214.46
5.5.280.0070.03115.33
5.5.270.0050.01815.48
5.5.260.0100.02915.35
5.5.250.0090.02715.21
5.5.240.0090.02615.27
5.5.230.0050.00712.64
5.5.220.0030.01012.70
5.5.210.0040.00512.60
5.5.200.0070.00512.71
5.5.190.0040.00712.61
5.5.180.0060.00612.66
5.5.170.0080.00612.71
5.5.160.0050.00912.62
5.5.150.0050.00412.81
5.5.140.0020.00912.50
5.5.130.0030.00812.67
5.5.120.0050.00712.88
5.5.110.0050.00812.65
5.5.100.0050.00512.65
5.5.90.0060.00612.63
5.5.80.0030.00812.49
5.5.70.0050.00812.65
5.5.60.0050.01212.64
5.5.50.0080.00612.54
5.5.40.0080.00812.51
5.5.30.0080.00612.77
5.5.20.0050.00912.62
5.5.10.0090.00612.65
5.5.00.0070.00412.49

preferences:
43.97 ms | 401 KiB | 5 Q