On Wed, 17 May 2023 at 18:24, Gunnard engebreth <gunn...@gunnard.org> wrote:

>
> > Maybe im missing something here but the already available `dirname()`
> does this. right?
> https://www.php.net/manual/en/function.dirname.php
>
>
dirname just traverses up the directory, it doesn't join paths.

For example, this example won't be possible with dirname:

path_join('/root', '/foo\\bar/baz', '../test', 'file.json'); // =>
/foo/bar/test/file.json

Reply via email to