mckayb/phantasy-php

Curried version of all PHP functions

v1.0.0 2019-02-24 21:16 UTC

This package is auto-updated.

Last update: 2024-10-25 10:13:36 UTC


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.

Inspiration