PHPackages                             mckayb/phantasy-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mckayb/phantasy-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mckayb/phantasy-php
===================

Curried version of all PHP functions

v1.0.0(7y ago)115MITPHPPHP &gt;=7.1.0

Since Aug 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mckayb/phantasy-php)[ Packagist](https://packagist.org/packages/mckayb/phantasy-php)[ RSS](/packages/mckayb-phantasy-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Phantasy-PHP [![CircleCI](https://camo.githubusercontent.com/2d9907e7f65a41600497f15d505b91faecdb701b6cd5ec58d30fb354054ca953/68747470733a2f2f636972636c6563692e636f6d2f67682f6d636b6179622f7068616e746173792d7068702e7376673f7374796c653d737667)](https://circleci.com/gh/mckayb/phantasy-php)[![Coverage Status](https://camo.githubusercontent.com/712ffc4c34e5a010e4fa1f2beebabffb3202a28ee80cd38833df90abb2f19cf0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d636b6179622f7068616e746173792d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mckayb/phantasy-php)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#phantasy-php-)

Curried versions of common PHP functions.

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

`composer require mckayb/phantasy-php`

### Usage

[](#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!](https://github.com/mckayb/phantasy-php/tree/master/docs)

### What's Included

[](#whats-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

[](#contributing)

Find a bug? Want to make any additions? Just create an issue or open up a pull request.

### Inspiration

[](#inspiration)

- [LambdaJS](https://github.com/loop-recur/lambdajs)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~114 days

Recently: every ~142 days

Total

6

Last Release

2675d ago

Major Versions

v0.3.1 → v1.0.02019-02-24

PHP version history (2 changes)v0.1.0PHP &gt;=7.0.0

v1.0.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1355708?v=4)[McKay Broderick](/maintainers/mckayb)[@mckayb](https://github.com/mckayb)

---

Top Contributors

[![mckayb](https://avatars.githubusercontent.com/u/1355708?v=4)](https://github.com/mckayb "mckayb (41 commits)")

---

Tags

functionalphantasyphantasy-phpphp

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mckayb-phantasy-php/health.svg)

```
[![Health](https://phpackages.com/badges/mckayb-phantasy-php/health.svg)](https://phpackages.com/packages/mckayb-phantasy-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
