An associative array with known keys can be easily custom sorted using a switch statement in the callback:
NB ksort can be used beforehand to ensure expected results
ksort($array);
uksort($array, function ($a) {
switch($a) {
case 'pepperoni':
return 0;
case 'beef':
return 1;
case 'chicken':
return 2;
case 'ham':
return 3;
case 'vegetarian':
return 4;
}
});