Whenever you have \n, \t, etc. inside double quotes, PHP immediately replaces that sequence with a special character. For \n, this character is decimal # 13, octal # 015, hex # D, etc.
This happens before the string is passed to the function. So the slashes() functions never see a literal \ and a literal n, instead they see the special character mentioned above.