public static function dirname($path)
    {
        $pos = mb_strrpos(str_replace('\\', '/', $path), '/');
        if ($pos !== false) {
            return mb_substr($path, 0, $pos);
        }

        return '';
    }
public static function dirname($path)
    {
        $pos = mb_strrpos(str_replace('\\', '/', $path), '/');
        if ($pos !== false) {
            return mb_substr($path, 0, $pos);
        }

        return '';
    }
public static function dirname ( $ path ) { $ pos = mb_strrpos ( str_replace ( '\\' , '/' , $ path ) , '/' ) ; if ( $ pos !== false ) { return mb_substr ( $ path , 0 , $ pos ) ; } return '' ; }
Returns parent directory's path.
This method is similar to `dirname()` except that it will treat
both \ and / as directory separators, independent of the operating system.

@param string $path A path string.
@return string the parent directory's path.
@see https://secure.php.net/manual/en/function.basename.php
Returns parent directory s path . This method is similar to dirname () except that it will treat both \ and / as directory separators independent of the operating system .