php-forge / helper
Small, focused helpers for common PHP tasks.
Installs: 650
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/php-forge/helper
Requires
- php: ^8.1
Requires (Dev)
- infection/infection: ^0.27|^0.32
- maglnet/composer-require-checker: ^4.1
- php-forge/coding-standard: ^0.1
- php-forge/support: ^0.3
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0.3
- phpunit/phpunit: ^10.5
- xepozz/internal-mocker: ^1.4
This package is auto-updated.
Last update: 2026-03-04 07:38:24 UTC
README
PHP Helper
Small, focused helpers for common PHP tasks
Convert word casing, inspect metadata, generate passwords, and list time zones with predictable output.
Features
Installation
composer require php-forge/helper:^0.2
Quick start
Convert camelCase to snake_case
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\WordCaseConverter; $word = WordCaseConverter::camelToSnake('dateBirth'); // date_birth
Convert snake_case to camelCase
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\WordCaseConverter; $word = WordCaseConverter::snakeToCamel('date_birth'); // dateBirth
Convert text to title words
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\WordCaseConverter; $word = WordCaseConverter::toTitleWords('dateOfMessage'); // Date Of Message
Generate passwords
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\PasswordGenerator; $password = PasswordGenerator::generate(12); // e.g. aB3#kL9!mN2@
Retrieve all time zones
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\TimeZoneList; $timezones = TimeZoneList::all(); // [['timezone' => 'Pacific/Midway', 'name' => 'Pacific/Midway (UTC -11:00)', 'offset' => -39600], ...]
Inspect class metadata with Reflector
<?php declare(strict_types=1); namespace App; use PHPForge\Helper\Reflector; $shortName = Reflector::shortName(\App\Domain\User::class); $types = Reflector::propertyTypeNames(\App\Domain\User::class, 'email'); $attributes = Reflector::propertyAttributes(\App\Domain\User::class, 'email');
Documentation
For detailed configuration options and advanced usage.
- ๐ Installation Guide
- ๐ก Usage Examples
- ๐งช Testing Guide
- ๐ ๏ธ Development Guide