3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ ['name'=>'John B'], ['age'=>30], ['sizes'=> [ 'weight'=>80, 'height'=>120 ] ] ], [ ['name'=>'Marie B'], ['age'=>31], ['sizes'=> [ 'weight'=>60, 'height'=>110 ] ] ], [ ['name'=>'Carl M'], ['age'=>12], ['sizes'=> [ 'weight'=>70, 'height'=>100 ] ] ], [ ['name'=>'Mike N'], ['age'=>19], ['sizes'=> [ 'weight'=>70, 'height'=>150 ] ] ], [ ['name'=>'Nancy N'], ['age'=>15], ['sizes'=> [ 'weight'=>60, 'height'=>150 ] ] ], [ ['name'=>'Cory X'], ['age'=>15], ['sizes'=> [ 'weight'=>44, 'height'=>150 ] ] ] ]; function method($a,$b) { return ($a[2]["sizes"]["weight"] <= $b[2]["sizes"]["weight"]) ? -1 : 1; } usort($array, "method"); 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.70.0080.01116.50
8.3.60.0110.01118.55
8.3.50.0210.00019.51
8.3.40.0110.00418.61
8.3.30.0130.00618.69
8.3.20.0040.00421.91
8.3.10.0050.00323.70
8.3.00.0030.00523.70
8.2.190.0090.00618.11
8.2.180.0070.00716.63
8.2.170.0000.01522.96
8.2.160.0150.00020.23
8.2.150.0080.00024.18
8.2.140.0090.00924.66
8.2.130.0070.00018.03
8.2.120.0070.00026.35
8.2.110.0030.00720.89
8.2.100.0080.00317.84
8.2.90.0040.00419.64
8.2.80.0000.00817.97
8.2.70.0030.00517.78
8.2.60.0060.00618.03
8.2.50.0030.00518.10
8.2.40.0000.00819.24
8.2.30.0030.00519.36
8.2.20.0040.00418.06
8.2.10.0030.00520.50
8.2.00.0040.00419.37
8.1.280.0120.00325.92
8.1.270.0040.00418.93
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00317.46
8.1.230.0040.00822.62
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0030.00518.49
8.1.160.0040.00418.75
8.1.150.0050.00318.80
8.1.140.0000.00723.83
8.1.130.0000.00720.18
8.1.120.0040.00317.34
8.1.110.0000.00717.43
8.1.100.0030.00617.39
8.1.90.0000.00717.46
8.1.80.0050.00217.38
8.1.70.0030.00317.44
8.1.60.0080.00317.50
8.1.50.0040.00417.52
8.1.40.0060.00317.36
8.1.30.0000.00817.51
8.1.20.0030.00517.46
8.1.10.0000.00717.47
8.1.00.0040.00417.53
8.0.300.0000.00819.64
8.0.290.0080.00016.58
8.0.280.0080.00018.30
8.0.270.0000.00716.68
8.0.260.0040.00418.38
8.0.250.0030.00316.91
8.0.240.0030.00316.83
8.0.230.0040.00416.92
8.0.220.0060.00316.88
8.0.210.0030.00316.75
8.0.200.0040.00416.93
8.0.190.0000.00816.86
8.0.180.0030.00516.89
8.0.170.0000.00816.87
8.0.160.0040.00416.89
8.0.150.0000.00716.76
8.0.140.0040.00416.82
8.0.130.0030.00313.32
8.0.120.0060.00316.77
8.0.110.0000.00716.75
8.0.100.0000.00816.80
8.0.90.0000.00816.84
8.0.80.0090.01016.84
8.0.70.0000.00716.75
8.0.60.0040.00416.89
8.0.50.0050.00216.82
8.0.30.0120.00616.89
8.0.20.0070.01017.40
8.0.10.0040.00416.86
8.0.00.0140.00816.74
7.4.330.0000.00516.85
7.4.320.0000.00616.55
7.4.300.0030.00316.39
7.4.290.0040.00416.54
7.4.280.0000.00816.48
7.4.270.0030.00316.55
7.4.260.0000.00716.39
7.4.250.0000.00816.31
7.4.240.0000.00916.47
7.4.230.0070.00016.58
7.4.220.0000.00716.29
7.4.210.0100.00716.49
7.4.200.0040.00416.45
7.4.160.0050.01216.42
7.4.140.0100.01117.86
7.4.130.0110.01416.36
7.4.120.0120.00816.41
7.4.110.0150.00916.45
7.4.100.0150.00416.50
7.4.90.0030.01516.40
7.4.80.0330.01519.39
7.4.70.0040.01216.32
7.4.60.0090.00916.44
7.4.50.0040.01116.36
7.4.40.0080.00816.18
7.4.00.0070.01215.04
7.3.330.0030.00313.16
7.3.320.0030.00313.09
7.3.310.0070.00016.25
7.3.300.0070.00016.27
7.3.290.0050.00216.17
7.3.280.0080.00816.27
7.3.260.0090.00816.46
7.3.240.0150.00616.42
7.3.230.0110.00716.41
7.3.210.0120.00616.29
7.3.200.0090.00816.25
7.3.190.0030.01216.47
7.3.180.0070.01116.29
7.3.170.0120.00616.57
7.3.160.0110.00516.50
7.3.120.0130.00614.91
7.3.110.0030.01315.09
7.3.100.0070.00714.79
7.3.90.0040.00714.58
7.3.80.0120.00314.78
7.3.70.0060.00314.84
7.3.60.0090.00314.70
7.3.50.0040.00714.44
7.3.40.0000.01814.96
7.3.30.0000.01214.64
7.3.20.0030.00916.63
7.3.10.0130.00216.41
7.3.00.0130.00715.94
7.2.330.0090.00916.67
7.2.320.0100.00716.31
7.2.310.0100.00716.68
7.2.300.0100.00716.71
7.2.290.0030.01416.62
7.2.250.0000.01814.70
7.2.240.0100.00315.16
7.2.230.0030.00614.98
7.2.220.0000.00915.25
7.2.210.0090.00614.93
7.2.200.0060.00314.88
7.2.190.0060.00315.12
7.2.180.0110.00414.92
7.2.170.0000.01515.01
7.2.130.0210.00715.53
7.2.120.0260.00315.77
7.2.110.0190.00715.63
7.2.100.0190.00715.69
7.2.90.0220.00715.81
7.2.80.0200.00515.58
7.2.70.0160.00715.72
7.2.60.0170.00615.81
7.2.50.0180.00615.92
7.2.40.0140.01015.72
7.2.30.0150.00915.91
7.2.20.0200.00615.38
7.2.10.0170.00815.78
7.2.00.0190.00315.87
7.1.330.0070.00715.95
7.1.320.0060.00615.85
7.1.310.0030.00615.84
7.1.300.0070.00315.83
7.1.290.0030.01315.98
7.1.280.0030.00615.70
7.1.270.0000.01215.79
7.1.260.0070.00715.87
7.1.250.0210.00714.72
7.0.330.0180.00914.35
5.6.380.0000.01914.40

preferences:
44.24 ms | 401 KiB | 5 Q