src/Path/PathHelper.php
public static function join (...$paths) : string
    {
        $normalized = [];

        foreach ($paths as $index => $path)
        {
            if (0 !== $index)
            {
                $path = \ltrim($path, "/");
            }

            if ($index !== \count($paths) - 1)
            {
                $path = \rtrim($path, "/");
            }

            $normalized[] = $path;
        }

        return \implode("/", $normalized);
    }
public static function join (...$paths) : string
    {
        $normalized = [];

        foreach ($paths as $index => $path)
        {
            if (0 !== $index)
            {
                $path = \ltrim($path, "/");
            }

            if ($index !== \count($paths) - 1)
            {
                $path = \rtrim($path, "/");
            }

            $normalized[] = $path;
        }

        return \implode("/", $normalized);
    }
public static function join ( ... $ paths ) : string { $ normalized = [ ] ; foreach ( $ paths as $ index => $ path ) { if ( 0 !== $ index ) { $ path = \ ltrim ( $ path , "/" ) ; } if ( $ index !== \ count ( $ paths ) - 1 ) { $ path = \ rtrim ( $ path , "/" ) ; } $ normalized [ ] = $ path ; } return \ implode ( "/" , $ normalized ) ; }
Joins path segments to one full path.

@param string[] ...$paths

@return string
Joins path segments to one full path .