isRelativePath.php
Table of Contents
Functions
- isRelativePath() : bool
- Determines whether a given path is relative.
Functions
isRelativePath()
Determines whether a given path is relative.
isRelativePath(string $path) : bool
A path is considered relative if it is not absolute. This function is the
direct inverse of isAbsolutePath()
. It will return true for paths that
do not start with a slash, a backslash, or a Windows drive letter.
Parameters
- $path : string
-
The path to check.
Tags
Return values
bool —True if the path is relative, false if it is absolute.