It is recommended to say it after mentioning or hearing the prophet Muhammad’s name.

Is it obligatory to say ” Salalahu Alayhi Wa’Salam ” when hearing the name Muhammad (PBUH), even though the name is not referring to The actual Prophet Muhammad (PBUH), but is a name of another person etc?