PHPackages                             alecrabbit/php-helpers - 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. alecrabbit/php-helpers

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

alecrabbit/php-helpers
======================

PHP helpers functions

0.8.2(5y ago)08.5k[1 PRs](https://github.com/alecrabbit/php-helpers/pulls)10MITPHPPHP ^7.2

Since Nov 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/alecrabbit/php-helpers)[ Packagist](https://packagist.org/packages/alecrabbit/php-helpers)[ Patreon](https://www.patreon.com/alecrabbit)[ RSS](/packages/alecrabbit-php-helpers/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (30)Used By (10)

PHP Helpers
===========

[](#php-helpers)

Set of useful helper functions

[![PHP Version](https://camo.githubusercontent.com/f8fe0b235fd63811e6ce53d2e6ec40ea5cc453802ccd4eae537dbe13795b4d0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c65637261626269742f7068702d68656c706572732e737667)](https://php.net)[![Build Status](https://camo.githubusercontent.com/03d78a6ad7ef94e2586ccc69f0bf1c32b77457ca980e07e4fba545ea37feb9d2/68747470733a2f2f7472617669732d63692e636f6d2f616c65637261626269742f7068702d68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alecrabbit/php-helpers)[![Appveyor Status](https://camo.githubusercontent.com/bab9cb9a4d1b53b88be461d9a4a4b76d5e001903099d3d30f31aedce54d39026/68747470733a2f2f696d672e736869656c64732e696f2f6170707665796f722f63692f616c65637261626269742f7068702d68656c706572732e7376673f6c6162656c3d6170707665796f72)](https://ci.appveyor.com/project/alecrabbit/php-helpers/branch/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/82a5a53e81509cb30b91f4a0b828a1d4c8cf0a4d7655b28d0d24fca6922cc862/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65637261626269742f7068702d68656c706572732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alecrabbit/php-helpers/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/9b736417db2b21636461fc8e251986744b0222451c7286995f64728b639b8b71/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65637261626269742f7068702d68656c706572732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alecrabbit/php-helpers/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/b734343fc8d028ab66121fc17f00550b1d9ba109eeeb520ea2c3efaefc175fc2/68747470733a2f2f706f7365722e707567782e6f72672f616c65637261626269742f7068702d68656c706572732f646f776e6c6f616473)](https://packagist.org/packages/alecrabbit/php-helpers)

[![Latest Stable Version](https://camo.githubusercontent.com/6fbcb4fe5f53690eb884a6fe74df3deef4fc2dcbac3f2af160292140c21150df/68747470733a2f2f706f7365722e707567782e6f72672f616c65637261626269742f7068702d68656c706572732f762f737461626c65)](https://packagist.org/packages/alecrabbit/php-helpers)[![Latest Stable Version](https://camo.githubusercontent.com/25677ebfc1ebf5fa52453cb58d0efb5a4d5faa5e0feee75c2f3e2f7bf8bb3ed7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c65637261626269742f7068702d68656c706572732e737667)](https://packagist.org/packages/alecrabbit/php-helpers)[![Latest Unstable Version](https://camo.githubusercontent.com/5eeaac1714ec1630b5f4d96adb765611ef7da71992486edb77de8f3b2e028be1/68747470733a2f2f706f7365722e707567782e6f72672f616c65637261626269742f7068702d68656c706572732f762f756e737461626c65)](https://packagist.org/packages/alecrabbit/php-helpers)

[![License](https://camo.githubusercontent.com/d1937228783731f2264682c26ae0cc1f139f8e6efd36769984218e4904cb2831/68747470733a2f2f706f7365722e707567782e6f72672f616c65637261626269742f7068702d68656c706572732f6c6963656e7365)](https://packagist.org/packages/alecrabbit/php-helpers)

### Installation

[](#installation)

```
composer require alecrabbit/php-helpers
```

### Usage

[](#usage)

> See [examples](https://github.com/alecrabbit/php-helpers/tree/master/examples)

##### Quick example

[](#quick-example)

```
use function \AlecRabbit\typeOf;

echo typeOf(1); // "integer"
```

Functions
---------

[](#functions)

### [Miscellaneous Functions](docs/miscFunctions.md)

[](#miscellaneous-functions)

- typeOf()
- swap()
- inContainer()
- inRange()
- onWindows()

### [Array functions](docs/arrayFunctions.md)

[](#array-functions)

- is\_homogeneous()
- formatted\_array()
- array\_unset\_first()
- array\_unset\_last()

### [Numeric functions](docs/numericFunctions.md)

[](#numeric-functions)

- is\_negative()
- bounds()
- trim\_zeros()

### [Object functions](docs/objectsFunctions.md)

[](#object-functions)

- callMethod()
- getValue()

### [Time functions](docs/timeFunctions.md)

[](#time-functions)

- now()
- carbon()
- base\_timestamp()

### [String functions](docs/stringFunctions.md)

[](#string-functions)

- tag()
- brackets()
- str\_wrap()
- format\_bytes()
- format\_time()
- format\_time\_auto()
- boolToStr()

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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 ~21 days

Recently: every ~84 days

Total

26

Last Release

2188d ago

PHP version history (2 changes)0.0.16PHP &gt;=7.2

0.3.1PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![alecrabbit](https://avatars.githubusercontent.com/u/11045453?v=4)](https://github.com/alecrabbit "alecrabbit (281 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (7 commits)")

---

Tags

arraystringformatwrapprivatetrimprotectedfirst\_\_unsetzeros

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alecrabbit-php-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/alecrabbit-php-helpers/health.svg)](https://phpackages.com/packages/alecrabbit-php-helpers)
```

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1831.1M18](/packages/consistence-consistence)[hallindavid/manny

a package of manipulators that hopefully come in useful for those of us who always forget regex when we need it (manny is short for manipulation)

38103.3k2](/packages/hallindavid-manny)[phootwork/lang

Missing PHP language constructs

1224.8M8](/packages/phootwork-lang)[brunoconte3/dev-utils

A complete PHP utility library for validating, formatting, comparing data, and more.

3525.7k](/packages/brunoconte3-dev-utils)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)

PHPackages © 2026

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