Download the PHP package andrew-gos/helpers without Composer
On this page you can find all versions of the php package andrew-gos/helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrew-gos/helpers
More information about andrew-gos/helpers
Files in andrew-gos/helpers
Package helpers
Short Description Helpers
License MIT
Homepage https://github.com/CiBeRHeMuL/Helpers
Informations about the package helpers
Andrew-Gos/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
- Strict Typing & Closures: Uses
Closurefor 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
The project requires PHP 8.4 or higher.
Install the library via Composer:
๐ Quick Start
Array Helpers (HArray)
Example 1: Multi-level Grouping and Indexing
Example 2: Recursive Filtering
String Helpers (HString)
Example 3: Transliteration and Layout Correction
Example 4: Value Stringification (for logging/debugging)
๐งฉ 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
To run the test suite, ensure development dependencies are installed:
Then run PHPUnit:
๐ค Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.