PHPackages                             andrew-gos/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. andrew-gos/helpers

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

andrew-gos/helpers
==================

Helpers

1.0(4mo ago)076MITPHPPHP ^8.4CI passing

Since Jan 6Pushed 4mo agoCompare

[ Source](https://github.com/CiBeRHeMuL/Helpers)[ Packagist](https://packagist.org/packages/andrew-gos/helpers)[ Docs](https://github.com/CiBeRHeMuL/Helpers)[ RSS](/packages/andrew-gos-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Andrew-Gos/Helpers
==================

[](#andrew-goshelpers)

[![CI](https://github.com/CiBeRHeMuL/Helpers/actions/workflows/ci.yaml/badge.svg)](https://github.com/CiBeRHeMuL/Helpers)[![Latest Stable Version](https://camo.githubusercontent.com/624303e7a23c26b0492101d76260ac037735c126e69ae7981f1176814de7e8dc/68747470733a2f2f706f7365722e707567782e6f72672f616e647265772d676f732f68656c706572732f76657273696f6e2e737667)](https://packagist.org/packages/andrew-gos/helpers)[![Latest Unstable Version](https://camo.githubusercontent.com/4d9cf47d2112a3e0c97e625fa6c13927906f8a539f3844b741d37cdda391e174/68747470733a2f2f706f7365722e707567782e6f72672f616e647265772d676f732f68656c706572732f762f756e737461626c652e737667)](https://packagist.org/packages/andrew-gos/helpers)[![PHP Version Require](https://camo.githubusercontent.com/842ed6248f997e88f715f8cf77951b7256dd4c0076454e97f1a81a9df64bd14e/68747470733a2f2f706f7365722e707567782e6f72672f616e647265772d676f732f68656c706572732f726571756972652f706870)](https://packagist.org/packages/andrew-gos/helpers)[![License](https://camo.githubusercontent.com/72fac09289f21d5d0b347fa74f84a1be4e6203a91b3971cc64a2f9f89266eb29/68747470733a2f2f706f7365722e707567782e6f72672f616e647265772d676f732f68656c706572732f6c6963656e73652e737667)](https://packagist.org/packages/andrew-gos/helpers)[![Downloads](https://camo.githubusercontent.com/843815c40db1417572d3ae6d892a45c6fe4d951ff97655427120f2ec022fe4a9/68747470733a2f2f706f7365722e707567782e6f72672f616e647265772d676f732f68656c706572732f642f746f74616c2e737667)](https://packagist.org/packages/andrew-gos/helpers)[![codecov](https://camo.githubusercontent.com/0a6131e35f68c9dc9b7d37122c709d03a08e1e368b7fed942675e079063b31f7/68747470733a2f2f636f6465636f762e696f2f6769746875622f436942655248654d754c2f48656c706572732f67726170682f62616467652e737667)](https://codecov.io/github/CiBeRHeMuL/Helpers)

A collection of high-performance, strictly typed helper classes for arrays and strings in modern PHP applications.

This library provides powerful tools for complex data transformations, including multi-level grouping, recursive filtering, and advanced string manipulation.

🚀 Key Features
--------------

[](#-key-features)

- **Strict Typing &amp; Closures:** Uses `Closure` for callbacks to ensure type safety and avoid ambiguity.
- **Advanced Array Grouping:** Group and index data on multiple levels with projection support.
- **Recursive Filtering:** Cleanly filter nested arrays while preserving or resetting keys.
- **Human-Readable Data:** Convert bytes to strings and complex values to readable debug formats.
- **Multilingual Support:** Russian-to-English transliteration and keyboard layout correction.
- **Modern PHP:** Specifically built for PHP 8.4+ taking advantage of the latest language features.

🛠️ Installation
---------------

[](#️-installation)

The project requires PHP 8.4 or higher.

Install the library via [Composer](https://getcomposer.org/):

```
composer require andrew-gos/helpers
```

🏁 Quick Start
-------------

[](#-quick-start)

### Array Helpers (`HArray`)

[](#array-helpers-harray)

#### Example 1: Multi-level Grouping and Indexing

[](#example-1-multi-level-grouping-and-indexing)

```
use AndrewGos\Helpers\HArray;

$data = [
    ['city' => 'New York', 'role' => 'admin', 'name' => 'Alice'],
    ['city' => 'New York', 'role' => 'user', 'name' => 'Bob'],
    ['city' => 'London', 'role' => 'admin', 'name' => 'Charlie'],
];

// Group by city, then by role, and index elements by name
$result = HArray::groupExtended(
    array: $data,
    key: ['city', 'role'],
    index: 'name'
);

/* Output:
[
    'New York' => [
        'admin' => ['Alice' => [...]],
        'user'  => ['Bob' => [...]],
    ],
    'London' => [
        'admin' => ['Charlie' => [...]],
    ]
]
*/
```

#### Example 2: Recursive Filtering

[](#example-2-recursive-filtering)

```
use AndrewGos\Helpers\HArray;

$input = [1, [2, null, [3]], null];

// Recursively remove null values and "prune" empty branches
$filtered = HArray::filterRecursive($input, fn($v) => $v !== null);
// Output: [1, [2, [3]]]
```

### String Helpers (`HString`)

[](#string-helpers-hstring)

#### Example 3: Transliteration and Layout Correction

[](#example-3-transliteration-and-layout-correction)

```
use AndrewGos\Helpers\HString;

echo HString::rusToEng('Привет мир'); // Output: Privet mir
echo HString::changeEngKeyboardLayoutToRus('ghbdtn'); // Output: привет
```

#### Example 4: Value Stringification (for logging/debugging)

[](#example-4-value-stringification-for-loggingdebugging)

```
use AndrewGos\Helpers\HString;

$data = ['id' => 1, 'active' => true, 'tags' => ['php', '8.4']];
echo HString::stringifyValue($data);
// Output: [id => 1, active => true, tags => [0 => "php", 1 => "8.4"]]
```

🧩 Extension Suggestions
-----------------------

[](#-extension-suggestions)

- **ext-intl**: Highly recommended for `HString::asBytes()`. It enables the ICU MessageFormatter for localized digital units (e.g., "1.25 MB" vs "1,25 МБ").

🧪 Testing
---------

[](#-testing)

To run the test suite, ensure development dependencies are installed:

```
composer install
```

Then run PHPUnit:

```
vendor/bin/phpunit
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a pull request or open an issue on [GitHub](https://github.com/CiBeRHeMuL/Helpers).

📜 License
---------

[](#-license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b8138927f33d6978608e73d01f2c42ef975bacd471c0b3235420beffcd21c90?d=identicon)[Andrew\_gos](/maintainers/Andrew_gos)

---

Tags

phphelpersstringsarraysandrew-gos

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/andrew-gos-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/andrew-gos-helpers/health.svg)](https://phpackages.com/packages/andrew-gos-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)
