Say I have a badly formatted path /public/var/www/html/images\uploads\
Are there any performance benefits between these two methods to "normalize" the slashes, or is it just a different way of doing things?
realpath($path) . DIRECTORY_SEPARATOR
str_replace('\\', '/', $path);