3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['company' => 'A', 'weight' => 4.6], ['company' => 'B', 'weight' => 1.7], ['company' => 'C', 'weight' => 3.7], ['company' => 'D', 'weight' => 13.2], ['company' => 'E', 'weight' => 1.85], ['company' => 'F', 'weight' => 2.07], ]; usort($arr, fn($a, $b) => $b['weight'] <=> $a['weight']); var_export($arr);

preferences:
33.3 ms | 405 KiB | 5 Q