mckayb / phantasy-php

Curried, composable versions of the standard PHP functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phantasy-PHP CircleCICoverage Status

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.

Inspiration

About

Curried, composable versions of the standard PHP functions

License:MIT License


Languages

Language:PHP 100.0%