3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'countries' => [ ['country_code' => 'US', 'growth' => 3.57], ['country_code' => 'CA', 'growth' => 4.77], ['country_code' => 'TT', 'growth' => 0], ], 'group_name' => 'North America', ], [ 'countries' => [ ['country_code' => 'BR', 'growth' => 2.19], ['country_code' => 'PE', 'growth' => 1.78], ['country_code' => 'UY', 'growth' => 8.83], ['country_code' => 'MX', 'growth' => 3.83], ], 'group_name' => 'South America', ], ]; var_export( array_map( function ($set) { usort($set['countries'], fn($a, $b) => $b['growth'] <=> $a['growth']); return $set; }, $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.5.00.0120.01120.15
8.4.150.0020.00014.05
8.4.140.0120.00917.69
8.4.130.0130.00817.81
8.4.120.0030.00520.70
8.4.110.0130.00722.42
8.4.100.0130.00718.78
8.4.90.0030.00618.95
8.4.80.0110.00918.82
8.4.70.0100.00518.09
8.4.60.0050.00820.55
8.4.50.0120.00818.68
8.4.40.0060.01217.91
8.4.30.0160.00318.79
8.4.20.0100.01017.68
8.4.10.0090.00019.41
8.3.280.0170.00318.48
8.3.270.0120.00716.54
8.3.260.0090.00816.80
8.3.250.0120.00618.67
8.3.240.0140.00420.91
8.3.230.0090.01016.64
8.3.220.0100.00818.99
8.3.210.0090.00916.78
8.3.200.0140.00516.51
8.3.190.0100.00917.00
8.3.180.0040.00416.64
8.3.170.0080.00020.85
8.3.160.0000.01017.29
8.3.150.0110.00720.66
8.3.140.0070.01116.64
8.3.130.0070.01016.51
8.3.120.0060.00318.94
8.3.110.0110.00418.33
8.3.100.0030.00616.84
8.3.90.0040.00419.96
8.3.80.0080.00318.43
8.3.70.0100.00718.55
8.3.60.0170.00318.59
8.3.50.0080.00618.66
8.3.40.0110.00421.82
8.3.30.0110.00320.29
8.3.20.0110.00725.66
8.3.10.0090.00625.66
8.3.00.0030.00625.66
8.2.290.0110.00720.36
8.2.280.0110.00718.44
8.2.270.0100.01019.22
8.2.260.0070.01116.62
8.2.250.0040.00416.60
8.2.240.0150.00417.34
8.2.230.0000.00920.94
8.2.220.0040.00424.06
8.2.210.0040.00426.77
8.2.200.0060.00318.16
8.2.190.0100.01016.88
8.2.180.0070.01116.63
8.2.170.0000.01518.88
8.2.160.0040.01122.96
8.2.150.0100.01025.66
8.2.140.0040.00425.66
8.2.130.0040.00425.66
8.2.120.0050.00325.66
8.2.110.0120.00625.66
8.2.100.0000.00925.66
8.2.90.0120.00625.66
8.2.80.0060.01225.66
8.2.70.0080.00025.66
8.2.60.0030.00625.66
8.2.50.0050.00325.66
8.2.40.0030.00525.66
8.2.30.0050.00325.66
8.2.20.0050.00325.66
8.2.10.0080.00625.66
8.2.00.0060.00325.66
8.1.330.0060.01222.21
8.1.320.0100.00916.24
8.1.310.0080.00016.70
8.1.300.0130.00718.39
8.1.290.0060.00318.88
8.1.280.0120.00625.92
8.1.270.0050.00325.66
8.1.260.0080.00025.66
8.1.250.0090.00925.66
8.1.240.0050.00325.66
8.1.230.0120.00625.66
8.1.220.0040.00425.66
8.1.210.0040.00425.66
8.1.200.0040.00425.66
8.1.190.0080.00025.66
8.1.180.0080.00025.66
8.1.170.0070.01125.66
8.1.160.0130.00725.66
8.1.150.0110.00825.66
8.1.140.0060.00325.66
8.1.130.0070.00725.66
8.1.120.0040.00425.66
8.1.110.0080.00025.66
8.1.100.0060.00925.66
8.1.90.0110.00325.66
8.1.80.0030.00525.66
8.1.70.0000.00825.66
8.1.60.0080.00025.66
8.1.50.0040.00425.66
8.1.40.0000.00825.66
8.1.30.0080.00025.66
8.1.20.0050.00325.66
8.1.10.0050.00325.66
8.1.00.0050.00325.66

preferences:
35.62 ms | 403 KiB | 5 Q