Il manuale PHP recita:
Note that when using default arguments, any defaults should be on the right side of any non-default arguments; otherwise, things will not work as expected. Consider the following code snippet:
Quindi se vuoi che $name non abbia un valore di default deve essere il primo dei parametri (quello più a sinistra)

Esmpio 5 e 6 del manuale ufficiale