3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 7.1.25 - 7.1.28, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(3) { ["choux"]=> int(4) ["filo"]=> int(5) ["shortcrust"]=> int(8) } array(3) { ["cream"]=> int(8) ["green onions"]=> int(5) ["beef"]=> int(3) }

preferences:
166.52 ms | 403 KiB | 165 Q