Path manipulation library
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Anton Smirnov bbef65aff7 Stable standard 3 months ago
docs Fix VCS paths 2 years ago
src Helper classes doc 2 years ago
tests test PathUtils 2 years ago
.gitattributes .gitattributes from tpl 3 months ago
.gitignore Docs stub 2 years ago
.gitlab-ci.yml Test in 8.2 6 months ago Changelog for 1.0.0 2 years ago README, LICENSE, CHANGELOG 2 years ago README, LICENSE, CHANGELOG 2 years ago
composer.json Stable standard 3 months ago
phpcs.xml Init package 2 years ago
phpunit.xml Update phpunit config 11 months ago
psalm.xml Init package 2 years ago

PHP Path Library

Packagist PHP License Gitlab pipeline status Codecov

A PHP library to work with absolute and relative paths.



use Arokettu\Path\PathUtils;
use Arokettu\Path\RelativePath;
use Arokettu\Path\UrlPath;

// simple interface

PathUtils::resolveRelativePath('/some/path', '../other/path');
// => /some/other/path
PathUtils::makeRelativePath('/some/path', '/some/other/path');
// => ../other/path

// OOP interface, more control

$url = UrlPath::parse('');
$rel = RelativePath::unix('../other/path');
// =>


composer require arokettu/path


Read full documentation here:

Also on Read the Docs:


Please file issues on our main repo at GitLab:


The library is available as open source under the terms of the MIT License.