3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $array = array( "id1" => array("unique" => 3), "id2" => array("unique" => 5), "id3" => array("unique" => 1), ); usort($array, function ($a, $b){ if ($a['unique'] == $b) { return 0; } return ($a['unique'] < $a['unique']) ? -1 : 1; }); print_r($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.0030.01018.30
8.3.50.0160.00722.05
8.3.40.0040.01218.71
8.3.30.0100.00320.34
8.3.20.0050.00318.70
8.3.10.0040.00421.11
8.3.00.0070.00019.68
8.2.180.0070.01416.50
8.2.170.0070.01022.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00326.16
8.2.120.0070.00019.98
8.2.110.0030.00721.03
8.2.100.0130.00317.90
8.2.90.0000.00819.01
8.2.80.0030.00517.97
8.2.70.0050.00317.75
8.2.60.0000.00818.04
8.2.50.0060.00318.10
8.2.40.0000.01120.48
8.2.30.0070.00021.29
8.2.20.0040.00417.60
8.2.10.0040.00417.75
8.2.00.0060.00317.80
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.04
8.1.230.0040.00817.89
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0080.00017.47
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0080.00018.56
8.1.160.0000.00722.15
8.1.150.0080.00018.69
8.1.140.0050.00217.48
8.1.130.0000.00717.90
8.1.120.0000.00717.37
8.1.110.0000.00817.48
8.1.100.0040.00417.43
8.1.90.0030.00517.37
8.1.80.0000.00717.45
8.1.70.0030.00317.39
8.1.60.0000.00917.61
8.1.50.0080.00017.46
8.1.40.0040.00417.40
8.1.30.0060.00317.64
8.1.20.0050.00317.70
8.1.10.0040.00417.49
8.1.00.0030.00617.56
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0080.00018.48
8.0.270.0030.00517.23
8.0.260.0030.00316.82
8.0.250.0050.00316.96
8.0.240.0090.00016.98
8.0.230.0000.00716.93
8.0.220.0050.00216.86
8.0.210.0080.00016.85
8.0.200.0030.00316.95
8.0.190.0040.00416.98
8.0.180.0050.00316.77
8.0.170.0080.00016.76
8.0.160.0040.00416.79
8.0.150.0000.00716.88
8.0.140.0000.00716.74
8.0.130.0040.00413.27
8.0.120.0030.00616.87
8.0.110.0000.00716.88
8.0.100.0040.00416.89
8.0.90.0000.00716.77
8.0.80.0090.00616.87
8.0.70.0040.00416.92
8.0.60.0050.00316.86
8.0.50.0000.00716.89
8.0.30.0080.01116.97
8.0.20.0140.00617.40
8.0.10.0000.00816.88
8.0.00.0090.00916.66
7.4.330.0000.00516.71
7.4.320.0000.00716.51
7.4.300.0060.00016.45
7.4.290.0000.00716.58
7.4.280.0070.00016.50
7.4.270.0030.00316.54
7.4.260.0000.00613.27
7.4.250.0030.00616.56
7.4.240.0070.00016.61
7.4.230.0030.00316.70
7.4.220.0080.01116.52
7.4.210.0080.00716.56
7.4.200.0070.00016.71
7.4.190.0070.00016.66
7.4.160.0050.01116.45
7.4.150.0060.01217.40
7.4.140.0150.00817.86
7.4.130.0110.00616.36
7.4.120.0110.01016.51
7.4.110.0160.00316.54
7.4.100.0070.01016.56
7.4.90.0070.01016.49
7.4.80.0090.01419.39
7.4.70.0060.01216.46
7.4.60.0120.00616.45
7.4.50.0040.00416.58
7.4.40.0000.01422.77
7.4.30.0100.00716.50
7.4.00.0060.00915.09
7.3.330.0000.00513.32
7.3.320.0030.00213.40
7.3.310.0040.00416.16
7.3.300.0030.00316.32
7.3.290.0110.00416.34
7.3.280.0050.01316.32
7.3.270.0130.00317.40
7.3.260.0050.01418.24
7.3.250.0100.01316.47
7.3.240.0060.01016.61
7.3.230.0100.00716.39
7.3.210.0100.00716.39
7.3.200.0100.00719.39
7.3.190.0100.00716.32
7.3.180.0100.01016.63
7.3.170.0060.01316.43
7.3.160.0110.00516.34
7.3.120.0040.01114.65
7.3.00.0060.00616.69
7.2.330.0110.00816.70
7.2.320.0070.01016.36
7.2.310.0090.01216.72
7.2.300.0140.00316.46
7.2.290.0130.00316.48
7.2.130.0110.00316.94
7.2.120.0090.00616.98
7.2.110.0040.01416.89
7.2.100.0040.01416.73
7.2.90.0060.01017.11
7.2.80.0030.00716.46
7.2.70.0070.00716.57
7.2.60.0020.01116.91
7.2.50.0030.01016.76
7.2.40.0070.00416.92
7.2.30.0000.01016.63
7.2.20.0060.00916.89
7.2.10.0070.00316.82
7.2.00.0020.00818.08
7.1.250.0150.00315.61
7.1.240.0060.00615.84
7.1.230.0100.00715.78
7.1.220.0060.00315.79
7.1.210.0030.00615.84
7.1.200.0080.00615.71
7.1.190.0120.00615.85
7.1.180.0100.00315.84
7.1.170.0110.00715.68
7.1.160.0100.00615.72
7.1.150.0000.01015.68
7.1.140.0000.01515.68
7.1.130.0060.01015.68
7.1.120.0000.01115.87
7.1.110.0000.01315.69
7.1.100.0020.00916.85
7.1.90.0070.00715.89
7.1.80.0040.00715.90
7.1.70.0040.00716.55
7.1.60.0090.01017.39
7.1.50.0130.00316.42
7.1.40.0000.01115.62
7.1.30.0040.00915.51
7.1.20.0030.00715.54
7.1.10.0070.01015.54
7.1.00.0080.01819.10
7.0.330.0100.00315.29
7.0.320.0030.01215.14
7.0.310.0030.00515.27
7.0.300.0100.00315.34
7.0.290.0080.00015.21
7.0.280.0090.00315.19
7.0.270.0030.01015.14
7.0.260.0060.00315.20
7.0.250.0030.00914.93
7.0.240.0070.00715.43
7.0.230.0070.00715.25
7.0.220.0110.00415.32
7.0.210.0080.00415.39
7.0.200.0020.00816.13
7.0.190.0030.00915.23
7.0.180.0070.01015.16
7.0.170.0030.01415.23
7.0.160.0040.01114.94
7.0.150.0030.01415.32
7.0.140.0050.03718.70
7.0.130.0080.00415.16
7.0.120.0060.00315.65
7.0.110.0030.00615.59
7.0.100.0100.00315.22
7.0.90.0090.00315.38
7.0.80.0080.04018.47
7.0.70.0080.02617.64
7.0.60.0030.02717.45
7.0.50.0080.02317.91
7.0.40.0030.02616.87
7.0.30.0070.03316.72
7.0.20.0030.02516.76
7.0.10.0020.02516.77
7.0.00.0050.02316.74
5.6.380.0000.01114.29
5.6.370.0070.01014.22
5.6.360.0030.00614.03
5.6.350.0000.01414.44
5.6.340.0040.01114.32
5.6.330.0030.01013.99
5.6.320.0030.01014.06
5.6.310.0080.00414.07
5.6.300.0000.01314.56
5.6.290.0060.01014.43
5.6.280.0050.04017.86
5.6.270.0030.01014.24
5.6.260.0000.01214.17
5.6.250.0070.00314.30
5.6.240.0000.01214.17
5.6.230.0090.04417.38
5.6.220.0030.03417.44
5.6.210.0010.02817.24
5.6.200.0070.02117.66
5.6.190.0030.02917.60
5.6.180.0070.02317.79
5.6.170.0060.02917.64
5.6.160.0020.02617.55
5.6.150.0030.03517.69
5.6.140.0020.02817.82
5.6.130.0050.02217.63
5.6.120.0090.02217.51
5.6.110.0020.02617.59
5.6.100.0050.03217.69
5.6.90.0070.02317.64
5.6.80.0030.04417.38
5.6.70.0040.02017.20
5.6.60.0050.02217.22
5.6.50.0030.02317.34
5.6.40.0070.01817.31
5.6.30.0070.01917.25
5.6.20.0120.03017.32
5.6.10.0000.03217.33
5.6.00.0030.02617.16
5.5.380.0060.00611.79
5.5.370.0050.04316.10
5.5.360.0030.02816.11
5.5.350.0060.02516.10
5.5.340.0020.03916.34
5.5.330.0020.02416.26
5.5.320.0030.03016.28
5.5.310.0040.02316.26
5.5.300.0040.02416.36
5.5.290.0050.02216.35
5.5.280.0050.02316.36
5.5.270.0030.02316.32
5.5.260.0060.02316.19
5.5.250.0020.02016.25
5.5.240.0020.03516.02
5.5.230.0040.02416.04
5.5.220.0020.02216.02
5.5.210.0060.03115.97
5.5.200.0060.02215.95
5.5.190.0070.03816.01
5.5.180.0050.02915.89
5.5.170.0000.00711.79
5.5.160.0030.02215.97
5.5.150.0050.02416.01
5.5.140.0030.03315.94
5.5.130.0030.04315.89
5.5.120.0070.03816.01
5.5.110.0050.04016.00
5.5.100.0050.02115.95
5.5.90.0050.04315.94
5.5.80.0030.04015.92
5.5.70.0090.02215.86
5.5.60.0150.03015.97
5.5.50.0020.04215.95
5.5.40.0080.02315.94
5.5.30.0050.04215.95
5.5.20.0030.03915.97
5.5.10.0060.04315.92
5.5.00.0000.03315.92
5.4.450.0080.03515.58
5.4.440.0030.02415.57
5.4.430.0030.02215.63
5.4.420.0000.02915.62
5.4.410.0000.02615.51
5.4.400.0060.01815.50
5.4.390.0050.02015.45
5.4.380.0010.01815.32
5.4.370.0040.01715.46
5.4.360.0030.01915.46
5.4.350.0020.03815.46
5.4.340.0040.02215.33
5.4.330.0070.00411.79
5.4.320.0000.02315.51
5.4.310.0030.02315.52
5.4.300.0020.02315.48
5.4.290.0030.03815.45
5.4.280.0070.04215.32
5.4.270.0030.04015.51
5.4.260.0120.02315.34
5.4.250.0060.04215.41
5.4.240.0030.02515.45
5.4.230.0000.02715.34
5.4.220.0050.02815.46
5.4.210.0070.02715.37
5.4.200.0100.03715.41
5.4.190.0050.02515.40
5.4.180.0050.02415.49
5.4.170.0070.02815.41
5.4.160.0030.02615.41
5.4.150.0070.03515.39
5.4.140.0020.03714.13
5.4.130.0070.03514.06
5.4.120.0040.02814.06
5.4.110.0040.02314.06
5.4.100.0010.04114.07
5.4.90.0020.03414.06
5.4.80.0130.02814.13
5.4.70.0050.03014.10
5.4.60.0050.02114.10
5.4.50.0020.02514.13
5.4.40.0070.03814.13
5.4.30.0000.04114.13
5.4.20.0020.04214.11
5.4.10.0020.04214.13
5.4.00.0020.03013.83
5.3.290.0030.01813.24
5.3.280.0050.03613.22
5.3.270.0000.03313.18
5.3.260.0050.02713.19
5.3.250.0020.04013.26
5.3.240.0070.04213.18
5.3.230.0050.04213.20
5.3.220.0020.03213.18
5.3.210.0020.02913.19
5.3.200.0030.02013.19
5.3.190.0020.04413.16
5.3.180.0030.04113.19
5.3.170.0040.03113.17
5.3.160.0020.03913.20
5.3.150.0070.03813.18
5.3.140.0030.03113.15
5.3.130.0050.04113.16
5.3.120.0030.03013.18
5.3.110.0040.04013.24
5.3.100.0000.04412.90
5.3.90.0050.02912.95
5.3.80.0040.02512.94
5.3.70.0030.02712.96
5.3.60.0020.02512.96
5.3.50.0050.03812.90
5.3.40.0100.02812.88
5.3.30.0030.04112.86
5.3.20.0060.02012.69
5.3.10.0040.03712.75
5.3.00.0030.04012.68
5.2.170.0050.02911.74
5.2.160.0050.03311.74
5.2.150.0030.03311.74
5.2.140.0040.03211.74
5.2.130.0030.02211.74
5.2.120.0040.01811.74
5.2.110.0000.03411.74
5.2.100.0030.03011.74
5.2.90.0030.03511.74
5.2.80.0060.02511.74
5.2.70.0060.02811.74
5.2.60.0050.02711.74
5.2.50.0030.03511.74
5.2.40.0080.02511.74
5.2.30.0060.02111.74
5.2.20.0060.02611.74
5.2.10.0070.02011.74
5.2.00.0030.02211.74
5.1.60.0050.02211.74
5.1.50.0050.02511.74
5.1.40.0020.02311.74
5.1.30.0050.02411.74
5.1.20.0050.02011.74
5.1.10.0030.02711.74
5.1.00.0020.03011.74
5.0.50.0040.01511.74
5.0.40.0020.02211.74
5.0.30.0030.02811.74
5.0.20.0060.01811.74
5.0.10.0020.02211.74
5.0.00.0070.02811.74
4.4.90.0020.02011.74
4.4.80.0000.02111.74
4.4.70.0020.01611.74
4.4.60.0000.01411.74
4.4.50.0010.02011.74
4.4.40.0010.02611.74
4.4.30.0030.01811.74
4.4.20.0030.01811.74
4.4.10.0020.01511.74
4.4.00.0030.02611.74
4.3.110.0000.02111.74
4.3.100.0010.01911.74
4.3.90.0030.01811.74
4.3.80.0000.02211.74
4.3.70.0020.02011.74
4.3.60.0030.01711.74
4.3.50.0020.01911.74
4.3.40.0020.02611.74
4.3.30.0030.01411.74
4.3.20.0020.02011.74
4.3.10.0000.02111.74
4.3.00.0040.01711.74

preferences:
41.04 ms | 401 KiB | 5 Q