Maybe using array_merge here like below would be best, because otherwise if you use prepend and gave an array of fallbackDirs, they will be reversed by the use of array_unshift.