I think this may be a stupid question, but I am quite confused whether I need to escape backslash in PHP.
echo \'Application\\Models\\User\'; prints Applicat
I think it depends on the context, but it is a good idea to escape backslashes if using it in file paths.
Another good idea is to assign the directory separator to a constant, which I've seen done in various applications before, and use it as thus:
If you wish to save space and typing, others use DS for the constant name.
This keeps your application portable if you move from a Windows environment to a *nix environment, as you can simple change the directory separator constant to a forward slash.