PHPackages                             fab2s/opinhelpers - 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. fab2s/opinhelpers

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

fab2s/opinhelpers
=================

A collection of Simple, opinionated yet hopefully useful PHP Helper Libs

1.0.1(2y ago)5486.3k↓25.9%11MITPHPPHP ^7.1|^8.0CI failing

Since Apr 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fab2s/OpinHelpers)[ Packagist](https://packagist.org/packages/fab2s/opinhelpers)[ RSS](/packages/fab2s-opinhelpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (1)

OpinHelpers
===========

[](#opinhelpers)

[![Build Status](https://camo.githubusercontent.com/baa3a381eb976f51e38910a121658cac2f4492d299ffa89001eae60f55589f67/68747470733a2f2f7472617669732d63692e636f6d2f66616232732f4f70696e48656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/fab2s/OpinHelpers) [![Total Downloads](https://camo.githubusercontent.com/6a611f8c171bfd6b0e6f4c04e5b5a74475dd90564462b8e2d49914a147d34d4f/68747470733a2f2f706f7365722e707567782e6f72672f66616232732f6f70696e68656c706572732f646f776e6c6f616473)](https://packagist.org/packages/fab2s/opinhelpers) [![Monthly Downloads](https://camo.githubusercontent.com/d306c2fa39f223a1e98f971692817b87dac72a876bf2efeb31fb35f466d42e98/68747470733a2f2f706f7365722e707567782e6f72672f66616232732f6f70696e68656c706572732f642f6d6f6e74686c79)](https://packagist.org/packages/fab2s/opinhelpers) [![Latest Stable Version](https://camo.githubusercontent.com/d62cf0f8f51ff7ce35ba5d6303932048d42f9a4a1736b2fc78a879dcb097e043/68747470733a2f2f706f7365722e707567782e6f72672f66616232732f6f70696e68656c706572732f762f737461626c65)](https://packagist.org/packages/fab2s/opinhelpers) [![PRs Welcome](https://camo.githubusercontent.com/7d9ed3c8f22eceb1711573169b1390cc0b1194467340dc815205060c162b5309/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)](http://makeapullrequest.com) [![License](https://camo.githubusercontent.com/4f87f365d2eb6f1b9ba7e956e3cfe27a4ce8cbb63e737625adb7302dd664e011/68747470733a2f2f706f7365722e707567782e6f72672f66616232732f6f70696e68656c706572732f6c6963656e7365)](https://packagist.org/packages/fab2s/opinhelpers)

`OpinHelpers` is a bellow "Swiss Army Knife" level set of opinionated Helper libs (hence the [opin\[h\]el](https://en.wikipedia.org/wiki/Opinel_knife)^^) covering some of the most annoying aspects of php programing, such as UTF8 string manipulation, arbitrary precision Mathematics or properly locking a file.

`OpinHelpers` libs are opinionated in several ways and do not aim at being universal, but they should hopefully be pretty useful in many IRL cases.

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

[](#installation)

`OpinHelpers` can be installed using composer:

```
composer require "fab2s/opinhelpers"

```

If you want to specifically install the php &gt;=7.2.0 version, use:

```
composer require "fab2s/opinhelpers" ^1

```

If you want to specifically install the php 5.6/7.1 version, use:

```
composer require "fab2s/opinhelpers" ^0

```

There are mostly ([see Compatibility](#compatibility)) no changes other than further typing from 0.x to 1.x

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

[](#documentation)

`OpinHelpers` is just requiring individual libraries that each has its own repository and documentation

- [Math](https://github.com/fab2s/Math): High precision base10 fluent helper with a rather strict approach
- [Utf8](https://github.com/fab2s/Utf8): Purely static UTF8 Helper
- [Strings](https://github.com/fab2s/Strings): Purely static String Helper to handle more advanced utf8 string manipulations
- [Bom](https://github.com/fab2s/Bom): Purely static zero dependencies BOM Helper to handle unicode BOMs
- [FileLock](https://github.com/fab2s/FileLock): fluent file locking *helper*

Compatibility
-------------

[](#compatibility)

`OpinHelpers` comes with a `deprecated.php` file you can `require` in your project should you need to keep using the old `namespace` from before **v1**

```
require 'vendor/fab2s/opinHelpers/src/deprecated.php';

// no you can
use fab2s\OpinHelpers\Math;

// same as
use fab2s\Math\Math;

// old version will be marked as deprecated
$number = fab2s\OpinHelpers\Math::numder('42');

// new one is ok with full type hints
$number = fab2s\Math\Math::numder('42');
```

> No notable changes where made to the methods names or signature, but there was some small return types changes (false vs null in `Utf8`), one edge value (`Utf8::chr(0) = "\0"`) and one bug with `UTF-32-LE` BOM detection. It should be ok in most of the cases but it is still preferable to refactor to new `namespace` and review the usage

Requirements
------------

[](#requirements)

`OpinHelpers` is tested against php 7.2, 7.3, 7.4 and 8.0

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

[](#contributing)

Contributions are welcome, do not hesitate to open issues and submit pull requests.

License
-------

[](#license)

Each of `OpinHelpers` components are open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity72

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

Recently: every ~500 days

Total

6

Last Release

755d ago

Major Versions

0.x-dev → 1.0.02019-09-20

PHP version history (3 changes)0.0.1PHP &gt;=5.6

1.0.0PHP &gt;=7.1

1.0.1PHP ^7.1|^8.0

### Community

Maintainers

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

---

Top Contributors

[![fab2s](https://avatars.githubusercontent.com/u/7323989?v=4)](https://github.com/fab2s "fab2s (43 commits)")

---

Tags

bomlockfilemathphp-helpersstringutf8utf8-string-manipulationphputf8stringhelpersmathSimplebcmathbomfilelock

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fab2s-opinhelpers/health.svg)

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

###  Alternatives

[coduo/php-to-string

Simple library that converts PHP value into strings

27112.7M10](/packages/coduo-php-to-string)[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)
