3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attachments = [ [ "year" => 2018, "id" => 14689 ], [ "year" => 2017, "id" => 14690 ], [ "year" => 2018, "id" => 14688 ], [ "year" => 2018, "id" => 14687 ] ]; usort($attachments, function ($first, $second) { return $first["year"] < $second["year"]; }); print_r($attachments);

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.4.140.0130.00817.47
8.4.130.0070.00418.01
8.4.120.0080.01124.13
8.4.110.0110.00920.75
8.4.100.0190.00518.63
8.4.90.0090.01120.83
8.4.80.0070.00317.73
8.4.70.0100.01118.37
8.4.60.0140.00518.83
8.4.50.0120.00917.93
8.4.40.0060.01319.41
8.4.30.0040.00419.54
8.4.20.0140.00720.59
8.4.10.0030.00617.92
8.3.270.0130.00716.69
8.3.260.0120.00716.65
8.3.250.0110.00818.65
8.3.240.0060.00417.16
8.3.230.0160.00316.78
8.3.220.0080.00719.14
8.3.210.0110.00716.85
8.3.200.0080.00116.65
8.3.190.0060.00216.65
8.3.180.0140.00718.39
8.3.170.0110.00016.65
8.3.160.0050.00318.53
8.3.150.0140.00420.60
8.3.140.0000.00819.00
8.3.130.0080.00016.63
8.3.120.0000.01620.66
8.3.110.0040.00420.94
8.3.100.0090.00624.06
8.3.90.0040.00426.77
8.3.80.0040.00418.56
8.3.70.0140.01016.63
8.3.60.0170.00320.25
8.3.50.0140.00218.07
8.3.40.0100.01018.66
8.3.30.0080.00818.75
8.3.20.0000.00721.77
8.3.10.0000.00723.67
8.3.00.0080.00021.85
8.2.290.0110.00720.51
8.2.280.0080.01218.42
8.2.270.0060.01218.94
8.2.260.0070.01118.96
8.2.250.0080.00817.00
8.2.240.0120.00417.26
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0030.00526.77
8.2.200.0060.00318.54
8.2.190.0060.00916.63
8.2.180.0070.00716.38
8.2.170.0120.00622.96
8.2.160.0100.00319.04
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.75
8.2.110.0090.00320.97
8.2.100.0090.00319.95
8.2.90.0040.00417.92
8.2.80.0000.00818.22
8.2.70.0060.00617.68
8.2.60.0030.00619.72
8.2.50.0000.00818.10
8.2.40.0040.00419.30
8.2.30.0030.00319.26
8.2.20.0050.00318.11
8.2.10.0040.00420.47
8.2.00.0050.00319.47
8.1.330.0080.01021.84
8.1.320.0110.01216.30
8.1.310.0090.00916.70
8.1.300.0090.00017.90
8.1.290.0040.00418.88
8.1.280.0110.00425.92
8.1.270.0000.00918.80
8.1.260.0000.00926.35
8.1.250.0070.00028.09
8.1.240.0030.00622.25
8.1.230.0070.00420.95
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0000.00718.10
8.1.170.0030.00618.59
8.1.160.0040.00418.89
8.1.150.0000.00718.77
8.1.140.0040.00422.14
8.1.130.0030.00320.07
8.1.120.0040.00317.53
8.1.110.0000.00717.48
8.1.100.0000.00717.39
8.1.90.0040.00417.48
8.1.80.0040.00417.35
8.1.70.0030.00617.45
8.1.60.0000.00817.56
8.1.50.0040.00417.53
8.1.40.0040.00417.42
8.1.30.0050.00517.64
8.1.20.0040.00417.66
8.1.10.0040.00417.44
8.1.00.0000.00717.42
8.0.300.0040.00419.64
8.0.290.0050.00316.75
8.0.280.0070.00018.31
8.0.270.0070.00017.18
8.0.260.0040.00418.36
8.0.250.0000.00916.98
8.0.240.0030.00317.02
8.0.230.0030.00316.99
8.0.220.0030.00716.98
8.0.210.0040.00416.86
8.0.200.0030.00317.02
8.0.190.0070.00017.00
8.0.180.0050.00316.98
8.0.170.0000.00817.02
8.0.160.0000.00716.88
8.0.150.0040.00416.88
8.0.140.0050.00216.92
8.0.130.0060.00013.39
8.0.120.0040.00416.94
8.0.110.0040.00416.78
8.0.100.0080.00016.82
8.0.90.0000.00716.78
8.0.80.0160.00316.88
8.0.70.0040.00416.97
8.0.60.0030.00516.83
8.0.50.0040.00416.90
8.0.30.0160.00517.26
8.0.20.0110.00717.23
8.0.10.0050.00316.85
8.0.00.0090.00816.79
7.4.330.0000.00516.66
7.4.320.0030.00316.60
7.4.300.0000.00616.55
7.4.290.0070.00016.50
7.4.280.0050.00216.50
7.4.270.0000.00716.50
7.4.260.0040.00416.59
7.4.250.0000.00716.41
7.4.240.0030.00316.48
7.4.230.0040.00416.53
7.4.220.0000.00816.68
7.4.210.0050.01116.61
7.4.200.0040.00416.53
7.4.160.0070.00816.51
7.4.140.0130.00717.86
7.4.130.0090.00916.34
7.4.120.0110.00716.62
7.4.110.0090.00916.54
7.4.100.0140.00416.52
7.4.90.0070.01116.55
7.4.80.0060.01419.39
7.4.70.0090.00916.54
7.4.60.0090.00616.46
7.4.50.0110.00416.39
7.4.40.0130.01016.36
7.4.10.0040.01114.89
7.4.00.0110.00614.88
7.3.330.0000.00613.16
7.3.320.0050.00313.25
7.3.310.0030.00316.40
7.3.300.0000.00716.16
7.3.290.0070.00016.24
7.3.280.0080.01016.21
7.3.260.0130.00716.25
7.3.240.0100.00616.27
7.3.230.0100.00716.40
7.3.210.0140.00316.25
7.3.200.0140.00716.30
7.3.190.0030.01316.51
7.3.180.0110.00516.20
7.3.170.0110.00716.38
7.3.160.0150.00316.55
7.3.130.0110.00714.89
7.3.120.0080.00814.84
7.3.110.0070.01014.75
7.3.100.0000.01414.88
7.3.90.0120.00514.88
7.3.80.0050.00514.84
7.3.70.0050.00814.78
7.3.60.0080.00714.82
7.3.50.0030.00914.69
7.3.40.0030.00814.67
7.3.30.0080.00514.70
7.3.20.0080.00716.47
7.3.10.0070.00716.46
7.3.00.0330.01015.84
7.2.330.0090.01016.66
7.2.320.0130.00516.71
7.2.310.0060.01116.36
7.2.300.0100.00716.38
7.2.290.0150.00616.43
7.2.260.0110.00414.96
7.2.250.0080.01115.00
7.2.240.0090.00514.92
7.2.230.0050.01014.87
7.2.220.0030.00614.91
7.2.210.0060.00714.67
7.2.200.0090.00614.95
7.2.190.0050.00714.86
7.2.180.0090.00214.88
7.2.170.0030.00814.86
7.2.160.0030.00714.81
7.2.150.0040.00816.54
7.2.140.0030.00716.88
7.2.130.0580.00315.80
7.2.120.0360.00715.94
7.2.110.0460.00315.83
7.2.100.0020.01515.70
7.2.90.0500.01015.79
7.2.80.0050.00816.00
7.2.70.0110.00516.01
7.2.60.0150.00515.90
7.2.50.0820.00815.89
7.2.40.0470.00516.05
7.2.30.0410.00615.95
7.2.20.0440.00716.04
7.2.10.0490.01415.95
7.2.00.0440.00716.03
7.1.330.0050.00615.73
7.1.320.0030.00715.76
7.1.310.0040.00915.76
7.1.300.0030.00715.59
7.1.290.0050.00515.77
7.1.280.0050.00915.81
7.1.270.0090.00115.82
7.1.260.0080.00715.67
7.1.250.0410.00514.84
7.1.240.0000.00915.98
7.1.230.0030.01015.86
7.1.220.0000.01515.92
7.1.210.0060.00315.73
7.1.200.0030.00915.79
7.1.190.0070.00715.89
7.1.180.0030.01015.78
7.1.170.0030.00615.80
7.1.160.0120.00415.67
7.1.150.0040.01115.54
7.1.140.0030.01315.86
7.1.130.0090.00615.59
7.1.120.0030.00715.53
7.1.110.0150.00015.69
7.1.100.0030.00915.80
7.1.90.0120.00015.44
7.1.80.0030.00715.90
7.1.70.0070.00715.66
7.1.60.0100.00315.84
7.1.50.0060.00315.79
7.1.40.0020.00515.41
7.1.30.0030.01115.50
7.1.20.0030.01015.72
7.1.10.0000.01415.79
7.1.00.0090.00415.85
7.0.330.0270.00914.29
7.0.320.0070.00715.50
7.0.310.0000.01115.29
7.0.300.0130.00015.36
7.0.290.0070.00715.14
7.0.280.0030.01015.39
7.0.270.0040.01115.41
7.0.260.0040.00815.38
7.0.250.0040.00715.34
7.0.240.0030.01015.21
7.0.230.0050.00315.41
7.0.220.0030.00715.41
7.0.210.0070.00315.21
7.0.200.0040.00715.38
7.0.190.0040.00415.41
7.0.180.0000.01315.31
7.0.170.0090.00415.36
7.0.160.0110.00415.34
7.0.150.0000.00915.15
7.0.140.0050.00515.43
7.0.130.0150.00015.19
7.0.120.0040.01215.47
7.0.110.0030.01015.52
7.0.100.0060.00615.17
7.0.90.0000.01215.39
7.0.80.0040.00715.26
7.0.70.0040.00415.45
7.0.60.0000.01615.34
7.0.50.0000.01015.27
7.0.40.0120.00613.35
7.0.30.0030.01213.32
7.0.20.0040.00713.26
7.0.10.0030.01013.56
7.0.00.0000.00913.51
5.6.400.0080.00614.64
5.6.390.0040.00714.23
5.6.380.0050.00614.30
5.6.370.0060.00614.46
5.6.360.0060.00914.31
5.6.350.0060.00314.30
5.6.340.0030.01014.41
5.6.330.0000.01514.54
5.6.320.0030.01014.29
5.6.310.0080.00314.61
5.6.300.0030.00614.65
5.6.290.0030.01314.55
5.6.280.0040.01214.37
5.6.270.0070.01114.31
5.6.260.0100.00713.95
5.6.250.0060.00614.31
5.6.240.0030.01014.15
5.6.230.0040.00714.38
5.6.220.0030.01414.45
5.6.210.0000.01414.16
5.6.200.0000.01314.64
5.6.190.0060.01214.59
5.6.180.0060.01014.38
5.6.170.0030.01014.09
5.6.160.0090.00314.40
5.6.150.0060.00614.20
5.6.140.0070.00714.64
5.6.130.0040.01414.53
5.6.120.0000.01614.40
5.6.110.0090.00614.31
5.6.100.0090.00314.33
5.6.90.0060.00313.94
5.6.80.0070.01114.21
5.6.70.0070.00714.17
5.6.60.0060.00614.34
5.6.50.0040.00714.29
5.6.40.0070.00314.46
5.6.30.0030.01014.34
5.6.20.0090.00614.18
5.6.10.0090.00614.10
5.6.00.0090.00614.26

preferences:
39.35 ms | 403 KiB | 5 Q