alecrabbit / php-helpers
PHP helpers functions
Fund package maintenance!
Patreon
Installs: 8 267
Dependents: 9
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
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: 2024-03-29 02:56:07 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()