public static function join($paths)
    {
        $joins = array_map('strval', is_array($paths) ? $paths : func_get_args());
        $parts = self::getParts($joins);
        $absolute = self::isAbsolute($joins[0]);
        $root = $absolute ? array_shift($parts) . DIRECTORY_SEPARATOR : '';
        $parts = self::resolve($parts, $absolute);

        return self::buildPath($root, $parts);
    }
public static function join($paths)
    {
        $joins = array_map('strval', is_array($paths) ? $paths : func_get_args());
        $parts = self::getParts($joins);
        $absolute = self::isAbsolute($joins[0]);
        $root = $absolute ? array_shift($parts) . DIRECTORY_SEPARATOR : '';
        $parts = self::resolve($parts, $absolute);

        return self::buildPath($root, $parts);
    }
public static function join ( $ paths ) { $ joins = array_map ( 'strval' , is_array ( $ paths ) ? $ paths : func_get_args ( ) ) ; $ parts = self :: getParts ( $ joins ) ; $ absolute = self :: isAbsolute ( $ joins [ 0 ] ) ; $ root = $ absolute ? array_shift ( $ parts ) . DIRECTORY_SEPARATOR : '' ; $ parts = self :: resolve ( $ parts , $ absolute ) ; return self :: buildPath ( $ root , $ parts ) ; }
Joins the provided file systems paths together and normalizes the result.

The paths can be provided either as multiple arguments to this method
or as an array. The paths will be joined using the system directory
separator and the result will be normalized similar to the normalization
method (the drive letter will not be prepended however).

Note that unless the first path in the list is an absolute path, the
entire resulting path will be treated as a relative path.

@param string[]|string $paths File system paths to join
@return string The joined file system paths
Joins the provided file systems paths together and normalizes the result .