public static function getSubPathOf(array $subDir, array $parentDir) : string
    {
        if (!self::isSubDirectoryOf($subDir, $parentDir)) {
            throw new \RuntimeException('Invalid sub directory');
        }

        $path = [];
        foreach (array_slice($subDir, count($parentDir)) as $dir) {
            $path[] = $dir;
        }
        return implode(DIRECTORY_SEPARATOR, $path);
    }
public static function getSubPathOf(array $subDir, array $parentDir) : string
    {
        if (!self::isSubDirectoryOf($subDir, $parentDir)) {
            throw new \RuntimeException('Invalid sub directory');
        }

        $path = [];
        foreach (array_slice($subDir, count($parentDir)) as $dir) {
            $path[] = $dir;
        }
        return implode(DIRECTORY_SEPARATOR, $path);
    }
public static function getSubPathOf ( array $ subDir , array $ parentDir ) : string { if ( ! self :: isSubDirectoryOf ( $ subDir , $ parentDir ) ) { throw new \ RuntimeException ( 'Invalid sub directory' ) ; } $ path = [ ] ; foreach ( array_slice ( $ subDir , count ( $ parentDir ) ) as $ dir ) { $ path [ ] = $ dir ; } return implode ( DIRECTORY_SEPARATOR , $ path ) ; }
Return the relative path from parentDir to subDir.

@param  array $subDir
@param  array $parentDir
@return string
Return the relative path from parentDir to subDir .