function Path::normalize
Normalizes the given path.
During normalization, all slashes are replaced by forward slashes ("/"). Contrary to {@link canonicalize()}, this method does not remove invalid or dot path segments. Consequently, it is much more efficient and should be used whenever the given path is known to be a valid, absolute system path.
This method is able to deal with both UNIX and Windows paths.
1 call to Path::normalize()
- Path::canonicalize in vendor/
symfony/ filesystem/ Path.php - Canonicalizes the given path.
File
-
vendor/
symfony/ filesystem/ Path.php, line 114
Class
- Path
- Contains utility methods for handling path strings.
Namespace
Symfony\Component\FilesystemCode
public static function normalize(string $path) : string {
return str_replace('\\', '/', $path);
}