isAbsolutePath.php
Table of Contents
Functions
- isAbsolutePath() : bool
- Determines whether a given path is absolute.
Functions
isAbsolutePath()
Determines whether a given path is absolute.
isAbsolutePath(string $path) : bool
This function checks for both UNIX-style absolute paths (starting with "/") and Windows-style absolute paths (e.g., "C:", "C:/", or just "C:"). It also handles paths with URI schemes like "file://" by stripping the scheme before analysis.
Parameters
- $path : string
-
The path to check.
Tags
Return values
bool —True if the path is absolute, false otherwise.