In PHP7, how to sort recursively all levels of the array to have any adjacent keys to be in lexicographical order?
This sample array:
$a = ['c'=>['d'=>1, 'a'=>2], 'b'=>['b'=>3, 'a'=>4], 'a'=>['z','x','y']];
I'm looking to translate to:
$a = ['a'=>['z','x','y'], 'b'=>['a'=>4, 'b'=>3], 'c'=>['a'=>2, 'd'=>1]];