- array_map: documentation ( source)
- array_multisort: documentation ( source)
- var_export: documentation ( source)
- setlocale: documentation ( source)
<?php
setLocale(LC_ALL, 'fr_FR');
$names = [
'Zoey and another (word)',
'Émilie and another word',
'Amber'
];
array_multisort(
array_map(fn($v) => iconv('utf-8', 'ascii//TRANSLIT', $v), $names),
$names
);
var_export($names);