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($fillings, $pastry); 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.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1 - 8.4.2
array(3) { ["shortcrust"]=> int(8) ["filo"]=> int(5) ["choux"]=> int(4) } array(3) { ["beef"]=> int(3) ["green onions"]=> int(5) ["cream"]=> int(8) }

preferences:
67.2 ms | 408 KiB | 5 Q