PHPackages                             carbontwelve/tools - 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. carbontwelve/tools

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

carbontwelve/tools
==================

Collection of code snippets that I have found useful from the internet

0.1(12y ago)0244MITPHPPHP &gt;=5.3.0

Since Oct 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/carbontwelve/tools)[ Packagist](https://packagist.org/packages/carbontwelve/tools)[ RSS](/packages/carbontwelve-tools/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Carbontwelve\\Tools
===================

[](#carbontwelvetools)

[![Scrutinizer Quality Score](https://camo.githubusercontent.com/eee05291eb702af7f6f2af8967ee9c828ce3ed45e5ccbba2a7f2f61d21b0c87d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636172626f6e7477656c76652f746f6f6c732f6261646765732f7175616c6974792d73636f72652e706e673f733d61316638373135396435646163623233376639616662373930636265333232353630326530316133)](https://scrutinizer-ci.com/g/carbontwelve/tools/)[![Build Status](https://camo.githubusercontent.com/2e1d26c42f45adb6bc80f095b82800706a4cdbd68c5035aa657753fa46f9c05e/68747470733a2f2f7472617669732d63692e6f72672f636172626f6e7477656c76652f746f6f6c732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/carbontwelve/tools)[![Code Coverage](https://camo.githubusercontent.com/28765821e84588e51ffd50bf45080f920075ee2d5f58d328464c374bc3b7cd54/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636172626f6e7477656c76652f746f6f6c732f6261646765732f636f7665726167652e706e673f733d65636232363538373333623439663939666131366535386538376565313561343730383638323438)](https://scrutinizer-ci.com/g/carbontwelve/tools/)

This is a growing collection of code snippets that I have stumbled upon on the internet during my day-to-day coding, many may have bugs, which are documented within the unit-tests. I try to write full tests for each snippet that I add to make them more useful.

Where the source of a snippet is known it is documented in that methods docblock.

Feel free to fork and add your own additions, fix bugs, etc and push back.

If someone could show me how to test the path class with a mocked filesystem, that would be awesome ;)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4608d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/32e6199648ca613ea8451f73c0b13977c35f98cfc0f369316ba7e10eb9c5e9c8?d=identicon)[carbontwelve](/maintainers/carbontwelve)

---

Top Contributors

[![carbontwelve](https://avatars.githubusercontent.com/u/464699?v=4)](https://github.com/carbontwelve "carbontwelve (13 commits)")

---

Tags

stringstimetoolsnumbers

### Embed Badge

![Health badge](/badges/carbontwelve-tools/health.svg)

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

###  Alternatives

[doctrine/inflector

PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.

11.4k855.8M711](/packages/doctrine-inflector)[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[delight-im/random

The most convenient way to securely generate anything random in PHP

2345.4k](/packages/delight-im-random)

PHPackages © 2026

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