src/Path.php
/**
     * Check if a given path is a relative path.
     *
     * @param string $path the path want to check
     *
     * @return bool
     */
Check if a given path is a relative path.
@param string $path the path want to check

@return bool
Check if a given path is a relative path . @param string $path the path want to check @return bool
public static function isRelative($path)
    {
        $path       = static::normalize($path, DIRECTORY_SEPARATOR);
        $splitParts = explode(DIRECTORY_SEPARATOR, $path);
        if (in_array('.', $splitParts) || in_array('..', $splitParts)) {
            return true;
        }
        return '' !== $splitParts[0] && 0 === preg_match('/^[a-z]:$/i', $splitParts[0]);
    }
public static function isRelative ( $ path ) { $ path = static :: normalize ( $ path , DIRECTORY_SEPARATOR ) ; $ splitParts = explode ( DIRECTORY_SEPARATOR , $ path ) ; if ( in_array ( '.' , $ splitParts ) || in_array ( '..' , $ splitParts ) ) { return true ; } return '' !== $ splitParts [ 0 ] && 0 === preg_match ( '/^[a-z]:$/i' , $ splitParts [ 0 ] ) ; }
Check if a given path is a relative path.
Check if a given path is a relative path .