public static function shift(&$path)
    {
        $parts = explode('/', trim($path, '/'), 2);
        $result = array_shift($parts);
        $path = array_shift($parts);

        return $result ?: null;
    }
public static function shift(&$path)
    {
        $parts = explode('/', trim($path, '/'), 2);
        $result = array_shift($parts);
        $path = array_shift($parts);

        return $result ?: null;
    }
public static function shift ( & $ path ) { $ parts = explode ( '/' , trim ( $ path , '/' ) , 2 ) ; $ result = array_shift ( $ parts ) ; $ path = array_shift ( $ parts ) ; return $ result ? : null ; }
Shift first directory out of the path.

@param string $path
@return string
Shift first directory out of the path .