alecrabbit / php-helpers
PHP helpers functions
Fund package maintenance!
0.8.2
2020-05-17 18:32 UTC
Requires
- php: ^7.2
- krowinski/bcmath-extended: ^4.2 || ^5.0
- nesbot/carbon: ^2.11
- symfony/polyfill-php73: ^1.10
Requires (Dev)
- ext-curl: *
- nunomaduro/collision: ^4.2
- phpunit/phpunit: ^8.5
- symfony/var-dumper: ^5.0
This package is auto-updated.
Last update: 2026-05-18 07:48:53 UTC
README
Set of useful helper functions
Installation
composer require alecrabbit/php-helpers
Usage
See examples
Quick example
use function \AlecRabbit\typeOf; echo typeOf(1); // "integer"
Functions
Miscellaneous Functions
- typeOf()
- swap()
- inContainer()
- inRange()
- onWindows()
Array functions
- is_homogeneous()
- formatted_array()
- array_unset_first()
- array_unset_last()
Numeric functions
- is_negative()
- bounds()
- trim_zeros()
Object functions
- callMethod()
- getValue()
Time functions
- now()
- carbon()
- base_timestamp()
String functions
- tag()
- brackets()
- str_wrap()
- format_bytes()
- format_time()
- format_time_auto()
- boolToStr()