- var_dump: documentation ( source)
- array_multisort: documentation ( source)
<?php
$pastry = ['shortcrust' => 8, 'choux' => 4, 'filo' => 5];
$fillings = ['beef' => 3, 'cream' => 8, 'green onions' => 5];
array_multisort($pastry, $fillings);
var_dump($pastry);
var_dump($fillings);