3v4l.org

run code in 300+ PHP versions simultaneously
<?php $promos = [ '1' => ['id' => '1', 'weight' => 1], '2' => ['id' => '2', 'weight' => 2], '3' => ['id' => '3', 'weight' => 3], '4' => ['id' => '4', 'weight' => 4], '5' => ['id' => '5', 'weight' => 5], '6' => ['id' => '6', 'weight' => 6], '7' => ['id' => '7', 'weight' => 7], '8' => ['id' => '8', 'weight' => 8], '9' => ['id' => '9', 'weight' => 9], '10' => ['id' => '10', 'weight' => 10], '11' => ['id' => '11', 'weight' => 11], ]; $cr['promos'] = [ '1' => ['id' => '1', 'weight' => 1], '2' => ['id' => '2', 'weight' => 2], '3' => ['id' => '3', 'weight' => 3], '4' => ['id' => '4', 'weight' => 4], '5' => ['id' => '5', 'weight' => 5], '6' => ['id' => '6', 'weight' => 6], '7' => ['id' => '7', 'weight' => 7], '8' => ['id' => '8', 'weight' => 8], '9' => ['id' => '9', 'weight' => 9], '10' => ['id' => '10', 'weight' => 10], '11' => ['id' => '11', 'weight' => 11], ]; $promo_weights = array_column($promos, 'weight', 'id'); array_multisort($promo_weights, SORT_ASC, $cr['promos']); var_dump($cr['promos']);

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.0150.00616.37
8.3.50.0070.00716.50
8.3.40.0080.00818.88
8.3.30.0070.00718.72
8.3.20.0050.00320.34
8.3.10.0040.00421.77
8.3.00.0090.00019.13
8.2.180.0110.00416.63
8.2.170.0180.00422.96
8.2.160.0090.00620.29
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0080.00020.95
8.2.120.0090.00026.35
8.2.110.0100.00021.08
8.2.100.0070.00417.84
8.2.90.0050.00319.23
8.2.80.0080.00017.97
8.2.70.0030.00917.50
8.2.60.0000.00818.04
8.2.50.0030.00518.10
8.2.40.0050.00320.45
8.2.30.0000.00821.04
8.2.20.0040.00417.98
8.2.10.0040.00418.12
8.2.00.0060.00317.99
8.1.280.0120.00425.92
8.1.270.0090.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00620.82
8.1.230.0040.00719.04
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0050.00517.23
8.1.180.0000.00818.10
8.1.170.0000.00718.96
8.1.160.0000.00718.99
8.1.150.0070.00020.48
8.1.140.0100.00019.55
8.1.130.0040.00418.75
8.1.120.0040.00417.36
8.1.110.0040.00417.28
8.1.100.0080.00017.41
8.1.90.0040.00417.41
8.1.80.0050.00317.31
8.1.70.0030.00617.30
8.1.60.0000.00817.49
8.1.50.0000.00817.50
8.1.40.0040.00417.45
8.1.30.0040.00417.44
8.1.20.0070.00417.46
8.1.10.0040.00417.45
8.1.00.0000.00817.43
8.0.300.0030.00520.09
8.0.290.0070.00016.75
8.0.280.0000.00818.29
8.0.270.0040.00417.11
8.0.260.0000.00716.72
8.0.250.0070.00016.88
8.0.240.0000.00816.89
8.0.230.0040.00416.73
8.0.220.0050.00216.74
8.0.210.0040.00416.74
8.0.200.0000.00716.93
8.0.190.0030.00616.90
8.0.180.0000.00816.88
8.0.170.0000.00716.74
8.0.160.0060.00316.72
8.0.150.0000.00716.79
8.0.140.0030.00416.80
8.0.130.0000.00513.23
8.0.120.0000.00716.76
8.0.110.0040.00416.72
8.0.100.0040.00416.89
8.0.90.0030.00516.71
8.0.80.0120.00616.80
8.0.70.0000.00716.69
8.0.60.0080.00016.77
8.0.50.0070.00016.66
8.0.30.0100.01016.79
8.0.20.0130.00917.40
8.0.10.0040.00416.90
8.0.00.0160.00316.71
7.4.330.0000.00715.55
7.4.320.0000.00616.46
7.4.300.0030.00316.53
7.4.290.0050.00316.51
7.4.280.0050.00216.45
7.4.270.0030.00316.50
7.4.260.0000.00716.34
7.4.250.0000.00916.53
7.4.240.0040.00416.49
7.4.230.0000.00716.52
7.4.220.0120.00916.54
7.4.210.0100.00816.50
7.4.200.0000.00716.54
7.4.160.0050.01216.52
7.4.150.0130.01217.40
7.4.140.0130.01017.86
7.4.130.0130.00516.58
7.4.120.0120.01216.47
7.3.330.0050.00012.94
7.3.320.0000.00613.12
7.3.310.0040.00216.29
7.3.300.0000.00716.18
7.3.290.0030.00316.27
7.3.280.0120.00916.24
7.3.270.0090.00917.40
7.3.260.0100.00816.49
7.3.250.0130.01116.11
7.3.240.0100.01016.41

preferences:
42.13 ms | 401 KiB | 5 Q