Why does backslash work for file or folder names, but question mark less so?
Characters to avoid in filenames
You shouldn't be using slashes or question marks in your filenames.  This can cause issues depending on the operating system/file system being used.
There's already an excellent answer in SuperUser What characters are safe in cross-platform file names for Linux, Windows and OS-X addressing this, but to summarize:

forward slashes are used to separate values in the path in *nix operating systems
back slashes are used to escape spaces in file names in *nix operating systems and as path separators in Windows.
Windows does not like \/:*?&quot;&lt;&gt;| in paths or filenames.

As for the &quot;double colon&quot; (::) this is a convention used by Finder to represent the home directory.  The single colon is a path separator.
Question Marks (and other characters) in URLs
This is not a good idea. First off, Windows users (the browsers actually) are going to have a hard time with the the file with the question mark.  Secondly, The question mark indicates a query string in PHP meaning, you're sending the PHP language a query or a command to execute.
For instance, take a look at this URL:
https://www.bing.com/search?form=MOZLBR&amp;pc=MOZI&amp;q=php+url+question+mark

Putting an arbitrary question mark in the file name of the URL will definitely throw a monkey in the wrench.
Additionally, you're not &quot;escaping&quot; characters in the URL with the percent sign - it's called &quot;Percent Encoding or URL Encoding.&quot;  This allows you to use special or reserved characters (like a space) in the URI and have it be functional.