3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inventory = [ ['type' => 'fruit', 'price' => 3.50], ['type' => 'milk', 'price' => 2.90], ['type' => 'pork', 'price' => 5.43], ]; usort( $inventory, fn(array $a, array $b): int => $b['price'] <=> $a['price'] ); print_r($inventory);

preferences:
24.89 ms | 405 KiB | 5 Q