This function does not work as shown in the php.net examples.
If you put your encoded filename into double-quotes as they suggest, then it will break on certain characters in filenames, such as ampersand.
For example if you have a filename called "foo & bar.jpg" and you use this function on it, your resulting filename when double-quoted will produce this and not be found:
"foo \& bar.jpg"
If you need to have a single argument where spaces are included then do not use this function with added double-quotes, use escapeshellarg() which encloses the whole string in single quotes.
I do not understand which purpose this particular function is intended for. I can't see any use for it, unless you pass it through another function and convert spaces " " to "\ ", which would allow you to use the string directly on the command line.