PHPackages                             petrknap/utils - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. petrknap/utils

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

petrknap/utils
==============

Useful PHP utils by Petr Knap

v2016.01.09(10y ago)0613MITPHPPHP &gt;=5.4

Since Jan 20Pushed 10y ago2 watchersCompare

[ Source](https://github.com/petrknap/utils)[ Packagist](https://packagist.org/packages/petrknap/utils)[ RSS](/packages/petrknap-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Useful PHP utils by Petr Knap
=============================

[](#useful-php-utils-by-petr-knap)

Useful PHP utilities by [Petr Knap](http://petrknap.cz/).

How to install
--------------

[](#how-to-install)

Merge this JSON code with your project `composer.json` file and run `composer install`. Instead of `dev-master` you can use [any released version](https://packagist.org/packages/petrknap/utils).

```
{
    "require": {
        "petrknap/utils": "dev-master"
    }
}
```

Or manually clone this repository via `git clone https://github.com/petrknap/utils.git` or download [this repository as ZIP](https://github.com/petrknap/utils/archive/master.zip) and extract files into your project.

Examples
--------

[](#examples)

If you are looking for examples visit [tests folder](https://github.com/petrknap/utils/tree/master/tests) or [URL shortening service repository](https://github.com/petrknap/link.petrknap.cz).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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 ~177 days

Total

3

Last Release

3781d ago

Major Versions

v2015.04.18 → v2016.01.092016-01-09

PHP version history (2 changes)v2015.01.20PHP &gt;=5.3

v2016.01.09PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e19f2ea17567eb9f536d1e00595b83630dfb8b2df6e7e422e06a9a48e85585?d=identicon)[petrknap](/maintainers/petrknap)

---

Top Contributors

[![petrknap](https://avatars.githubusercontent.com/u/8299754?v=4)](https://github.com/petrknap "petrknap (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/petrknap-utils/health.svg)

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

PHPackages © 2026

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