PHPackages                             phlib/path - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. phlib/path

ActiveLibrary

phlib/path
==========

PHP path handling component for dealing with escaped directory separators

2.2.0(3mo ago)01.9k↓100%LGPL-3.0PHPPHP ^8.1CI failing

Since Jul 15Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/phlib/path)[ Packagist](https://packagist.org/packages/phlib/path)[ RSS](/packages/phlib-path/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

phlib/path
==========

[](#phlibpath)

[![Code Checks](https://camo.githubusercontent.com/4165b838a8ea760d61c763927e241e90c81b60665aee1b11a869eedfbee3d90e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70686c69622f706174682f636f64652d636865636b732e796d6c3f6c6f676f3d676974687562)](https://github.com/phlib/path/actions/workflows/code-checks.yml)[![Codecov](https://camo.githubusercontent.com/a4ab03ae6db0506b51754fb98bfac05ffdce421a1d045c89c625f5a880b86472/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70686c69622f706174682e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/phlib/path)[![Latest Stable Version](https://camo.githubusercontent.com/0e4407c420ccc8e13c4803a9807a251a440ea04a26070e9cb36daf6f5029a716/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c69622f706174682e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/path)[![Total Downloads](https://camo.githubusercontent.com/9cbdc552819553f15bf16c04b51684746084f85ece14f2265231761300b44de9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c69622f706174682e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/path)[![Licence](https://camo.githubusercontent.com/94535b4f2a06b3421768424e2280854f7b9f29efe41533047c07ce5d5d776006/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f706174682e737667)](https://camo.githubusercontent.com/94535b4f2a06b3421768424e2280854f7b9f29efe41533047c07ce5d5d776006/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f706174682e737667)

PHP path handling component for dealing with escaped directory separators

Install
-------

[](#install)

Via Composer

```
$ composer require phlib/path
```

Usage
-----

[](#usage)

Creation of path instance

```
$path = \Phlib\Path::fromString('foo/bar/baz');
$info = $path->info(); // should return the same as `pathinfo`
```

Using path to parse paths with escaped directory separators

```
$path = \Phlib\Path::fromString('foo/bar\\/baz');
echo $path->info(\Phlib\Path::INFO_BASENAME); // bar\/baz
```

Build paths with escaped separators

```
$parts = ['foo', 'bar/baz', 'taz'];
$path  = new \Phlib\Path($parts);
echo $path->toString(); // foo/bar\/baz/taz
```

License
-------

[](#license)

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~499 days

Recently: every ~866 days

Total

8

Last Release

95d ago

Major Versions

1.0.4 → 2.0.02019-12-10

PHP version history (4 changes)1.0.4PHP ^5.4|^7,&lt;7.5

2.0.0PHP ^7.3

2.1.0PHP ^7.3 || ^8

2.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/135b7ddf9ec91c412e1b18174f81d1ad2bef66e732624195c156717c96b13731?d=identicon)[letssurf](/maintainers/letssurf)

![](https://www.gravatar.com/avatar/10c53cdcfb3a6d299820aecb993521cc1a972baa09fd8f31d2468908cded7e1d?d=identicon)[chrisminett](/maintainers/chrisminett)

---

Top Contributors

[![chrisminett](https://avatars.githubusercontent.com/u/1084019?v=4)](https://github.com/chrisminett "chrisminett (38 commits)")

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/phlib-path/health.svg)

```
[![Health](https://phpackages.com/badges/phlib-path/health.svg)](https://phpackages.com/packages/phlib-path)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
