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

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

antonioprimera/php-helpers
==========================

A lightweight set of php helpers, providing some missing or hard to achieve functionality, without the need to import some larger packages

v1.1(1y ago)01252MITPHPPHP ^8.1

Since Aug 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AntonioPrimera/php-helpers)[ Packagist](https://packagist.org/packages/antonioprimera/php-helpers)[ Docs](https://github.com/antonioprimera/php-helpers)[ RSS](/packages/antonioprimera-php-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (2)

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

[](#php-helpers)

[![Latest Version on Packagist](https://camo.githubusercontent.com/50c2cb18996b4b5041a0b6a7452b9c5c5978f38e964cf74aae3be26ee2c1f2a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e746f6e696f7072696d6572612f7068702d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/antonioprimera/php-helpers)[![Tests](https://camo.githubusercontent.com/c29470c62b391b6ce3cacf635974af6ab3d71fbed1394f657d1be75791c8e8a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616e746f6e696f7072696d6572612f7068702d68656c706572732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/antonioprimera/php-helpers/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/8ececbfdf21109c6713e1ca153a680980a6988d82d0e214366e7a5c765e6689b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e746f6e696f7072696d6572612f7068702d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/antonioprimera/php-helpers)

This is a lightweight set of php helpers, providing some missing or hard to achieve functionality in PHP, without the need to import some larger packages. This package is intended to be used in PHP Packages and projects, which are not using a framework like Laravel or Symfony (which already provide these functionalities).

Helpers
-------

[](#helpers)

### Array Helpers

[](#array-helpers)

- `arrayMap($array, $callback)` - Maps an array using a callback function, preserving the keys
- `arrayMapWithKeys($array, $callback)` - Maps an array using a callback function, allowing you to also change the keys

### String Helpers

[](#string-helpers)

- kebabCase($string) - Converts a string to kebab-case
- classBasename($classOrObject) - Returns the class name without the namespace

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require antonioprimera/php-helpers
```

Contributing
------------

[](#contributing)

Please be free to contribute to this package by submitting a pull request with any useful helper functions you might have. Please make sure to add tests for any new functionality.

This package will only contain basic helper functions, which are not already provided by PHP itself or which are hard to achieve in just one line with the built-in functions.

Credits
-------

[](#credits)

- [Antonio Primera](https://github.com/AntonioPrimera)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

2

Last Release

634d ago

Major Versions

v0.1 → v1.12024-08-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/77cac31fc31444fb45ef19e3628a7b243b5456679a9e6db635aa3b979bfdbefc?d=identicon)[AntonioPrimera](/maintainers/AntonioPrimera)

---

Top Contributors

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

---

Tags

php-helpersantonioprimera

###  Code Quality

TestsPest

### Embed Badge

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

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

PHPackages © 2026

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