mckayb / phantasy-php
Curried version of all PHP functions
v1.0.0
2019-02-24 21:16 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^3.4
README
Curried versions of common PHP functions.
Getting Started
Installation
composer require mckayb/phantasy-php
Usage
use function Phantasy\PHP\{explode, implode}; $explodeBySpace = explode(' '); $arr = $explodeBySpace('foo bar'); // ['foo', 'bar'] $implodeWithCommas = implode('-'); $implodeWithCommas($arr); // 'foo,bar'
For more information, read the docs!
What's Included
I'm slowly working my way up to all of the PHP functions, but I should have most of the ones that people use in their everyday code covered. If I'm missing one that you need, let me know by opening up an issue or a pull request.
Contributing
Find a bug? Want to make any additions? Just create an issue or open up a pull request.