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

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

veloxia/php-helpers
===================

Some PHP helpers.

v1.2(6y ago)0247[1 PRs](https://github.com/veloxiadev/php-helpers/pulls)1MITPHPCI passing

Since Feb 16Pushed 3w ago1 watchersCompare

[ Source](https://github.com/veloxiadev/php-helpers)[ Packagist](https://packagist.org/packages/veloxia/php-helpers)[ RSS](/packages/veloxia-php-helpers/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (8)Used By (1)

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

[](#php-helpers)

[![Latest Stable Version](https://camo.githubusercontent.com/0ab27219623d197d754b7f867d2a667ac3a2be3142276a42d54d5bd2bd3383f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656c6f7869612f7068702d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/veloxia/php-helpers)[![Total Downloads](https://camo.githubusercontent.com/b29746f8c394d8c96c93f0c6040f81982dc44ee82fdfdbf3dddbe1e3fc9cf286/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656c6f7869612f7068702d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/veloxia/php-helpers)[![Build Status](https://camo.githubusercontent.com/b04f8023c1a91bd7e7bbc494b9d92445210e1ab54be771bf378ea77043372a93/68747470733a2f2f7472617669732d63692e6f72672f76656c6f7869616465762f7068702d68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/veloxiadev/php-helpers)

Some PHP helpers.

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

[](#installation)

```
composer require veloxia/php-helpers
```

Usage
-----

[](#usage)

### Capture

[](#capture)

With `capture()` you can more easily return the `[1]` group of a regular expression, or `[0]` if no parenthesis are set. The function sets up delimeters automatically.

```
$text = 'This costs $200,00 including shipping.';

$exp = '\$(200),00'; // instead of /\$(200),00/i

echo capture($exp, $text);  // returns 200
```

It's also possible to use `capture_list()`. In this case the first match in the list of expressions will be returned.

```
$text = 'This costs 200 EUR including shipping.';
$exps = [
  '(\d+) USD',
  '(\d+) GBP',
  '\$(\d+)',
  '(\d+)',
];
echo capture_list($exps, $text); // => 200
```

### Number range

[](#number-range)

`number_range` creates a numeric range on the fly. Example:

```
echo number_range(10.5, 13.9, 2, '%');
// 10,50 – 13,90 %
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance62

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

5

Last Release

2255d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/56674701?v=4)[veloxia](/maintainers/veloxia)[@veloxia](https://github.com/veloxia)

---

Tags

phphelpers

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.6k2](/packages/transprime-research-piper)

PHPackages © 2026

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