alecrabbit / php-helpers
PHP helpers functions
Fund package maintenance!
Patreon
Installs: 8 316
Dependents: 9
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
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
- dev-master
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.1-ALPHA.1
- 0.6.0
- 0.6.0-ALPHA.1
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.2
- 0.5.1
- 0.5.1-RC0
- 0.5.0
- 0.4.2
- 0.3.1
- 0.2.6
- 0.1.4
- 0.0.16
- dev-dependabot/composer/krowinski/bcmath-extended-tw-4.2or-tw-5.0or-tw-6.0or-tw-7.0
- dev-dependabot/add-v2-config-file
- dev-develop
This package is auto-updated.
Last update: 2024-11-18 04:27:43 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()