PHPackages                             macwinnie/phphelpers - 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. macwinnie/phphelpers

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

macwinnie/phphelpers
====================

reusable PHP functions, e.g. RegEx ones

2.2.38(3y ago)04442CC-BY-SA-4.0PHPCI failing

Since Mar 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/macwinnie/PHP-Helpers)[ Packagist](https://packagist.org/packages/macwinnie/phphelpers)[ RSS](/packages/macwinnie-phphelpers/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (81)Used By (2)

RegEx Functions
===============

[](#regex-functions)

This small repo is used to maintain my regularly reused PHP functions, e.g. RegEx functions.

Usage
-----

[](#usage)

They can be used within any code for example like that:

```
var_dump( format2regex( 'uid=%s,ou=people,dc=example,dc=com' ) );
// string(43) "/uid\=(.*?),ou\=people,dc\=example,dc\=com/"
```

Installation by Composer
------------------------

[](#installation-by-composer)

This repo is meant to be included within other projects, so simply run this command to require it:

```
composer require macwinnie/phphelpers
```

Since the tool is also tested, please ensure to run `composer install --no-dev` in production stages, so no unnecessary tools are installed and autoloaded within your production environment!

Testing
-------

[](#testing)

All functionalities are developed along the BDD (behaviour driven development) principles. Therefor, [Behat](https://docs.behat.org) is used to write Gherkin test scenarios and test them – all that takes part within the `/tests` folder.

To run the tests, you'll need the full composer installation with all dependencies, the production and development ones. For example use `devopsansiblede/apache:latest` to run everything that follows:

```
docker pull devopsansiblede/apache
docker run -p80:80 -d --name phphelpers -v $(pwd):/var/www/html devopsansiblede/apache
docker exec -it -u www-data phphelpers composer install
docker exec -it -u www-data phphelpers vendor/bin/behat
```

Documentation
-------------

[](#documentation)

[Documentation current master state](https://macwinnie.github.io/PHP-Helpers/files/src-functions.html)

The functions within this repository are documented with DocBlock style. To visualize the documentation, the project is using [phpDocumentor](https://phpdoc.org/) to generate a viewable website with the documentation within the directory `/docs`.

To create the latest documentation, simply run the following Docker command:

```
docker pull phpdoc/phpdoc:3
rm -rf docs
docker run --rm -v $(pwd):/data phpdoc/phpdoc:3 --setting=graphs.enabled=true -d src -t docs --sourcecode --title=PHP-Helpers --no-interaction
cat  docs/css/base.css

code.prettyprint {
    background: var(--primary-color-lighten);
    border: 1px solid var(--code-border-color);
    border-radius: var(--border-radius-base-size);
    padding: 0.1em 0.4em;
    margin: 0.1em 0.2em;
    font-size: 0.9em !important;
}
pre.prettyprint {
    font-size: 0.8em !important;
}
EOF
```

*ATTENTION:* The phpDocumentor tag `latest` from Docker is somehow a very old one – one wants to use a version tag like the `:3` above.

last dependency update and test
-------------------------------

[](#last-dependency-update-and-test)

2023-01-29 23:22:39

Licence
-------

[](#licence)

[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

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

Total

80

Last Release

1204d ago

Major Versions

1.1.11 → 2.0.02021-10-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/06148942cbb815f08bd44856cdc26cc63446ef01adf1f207100ae76965c017d6?d=identicon)[macwinnie](/maintainers/macwinnie)

---

Top Contributors

[![macwinnie](https://avatars.githubusercontent.com/u/1001936?v=4)](https://github.com/macwinnie "macwinnie (120 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/macwinnie-phphelpers/health.svg)

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

###  Alternatives

[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)[amphp/parallel-functions

Parallel processing made simple.

27910.3M26](/packages/amphp-parallel-functions)[illuminate/redis

The Illuminate Redis package.

8314.0M314](/packages/illuminate-redis)[sylius/fixtures-bundle

Configurable fixtures for Symfony applications.

517.7M12](/packages/sylius-fixtures-bundle)[cartalyst/converter

A framework agnostic measurement conversion and formatting package featuring multiple types of measurements and currency conversion.

88434.4k7](/packages/cartalyst-converter)[symfony/ux-leaflet-map

Symfony UX Map Leaflet Bridge

13146.6k1](/packages/symfony-ux-leaflet-map)

PHPackages © 2026

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