PHPackages                             vervel/vervel - 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. vervel/vervel

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

vervel/vervel
=============

Functional utility methods inspired by Clojure

46PHP

Since Sep 14Pushed 8y ago3 watchersCompare

[ Source](https://github.com/blackwood/vervel)[ Packagist](https://packagist.org/packages/vervel/vervel)[ RSS](/packages/vervel-vervel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

vervel
======

[](#vervel)

[![Build Status](https://camo.githubusercontent.com/3c092a0fafee6bfec75e8a273934f1beb945e7aa4d1cf003af8ccc83ec4933f8/68747470733a2f2f7472617669732d63692e6f72672f626c61636b776f6f642f76657276656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/blackwood/vervel) [![Delicious](https://camo.githubusercontent.com/ccf05aafd612f847f1ed3c61b2f098dcb315be0c878f7a5f55a1ff0f77fee6ac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6368656573652d6772696c6c65642d6f72616e67652e737667)](http://blackwood.io)

vervel is an experiment in creating a functional utility library for PHP modeled as much as possible after Clojure's core library. thus its goal is to mock as many of Clojure's standard functions through aliasing, reordering of arities, or writing an implementation of the function. vervel is not currently a library which intends to bring any new data types or drastically different functionality to PHP itself, so if you're looking for laziness, persistent data structures or concurrency, maybe check back in a decade or so...

use in production at your own risk!

vervel lib
----------

[](#vervel-lib)

As a general rule, functions will be identical to their name in Clojure except converted from `kebab-case` to `snake_case` and have their `?` stripped (illegal character in PHP) unless that function name (after aforementioned conversion) already exists in PHP. Still figuring out a naming strategy that will be straightforward for that case. Consider the following:

The function `empty` in Clojure returns an empty colleciton or nil, while Clojure's `empty?` is used to check if a collection has no items. PHP already implements `empty` to check if an array is empty--and regardless, since PHP doesn't allow `?`, we'd still have ended up with two identically named functions if we tried to implement both. Since modifying core functions is a no-no, a new version of Clojure's `empty` will require a different name. Suggestions for strategy here is welcome.

Also, some functions, such as `array_map`,`array_reduce` and `array_filter` have had their arities made consistent and the prefix `array_` stripped (to reduce noise).

support
-------

[](#support)

As previously mentioned, full support of Clojure's data types is not the end goal, so many core Clojure functions are not here. This is more a wishlist/to-do list of planned support. If you can make a good argument for a function I missed, I'll try to support it!

### key

[](#key)

Supported - ✅
Planned Support - ⬜
Won't Support - ❌

#### flow control

[](#flow-control)

fnsupportnot✅and❌ (unless namespace conflict can be resolved)or❌ (unless namespace conflict can be resolved)cond❌ (covered by switch case, more or less.)### arrays (collections)

[](#arrays-collections)

fnsupportcount❌ (exists in PHP)empty❌ (unless namespace conflict can be resolved)not-empty❌ (unless namespace conflict can be resolved)into❌ (types not applicable)conj✅cons✅contains?✅ (see `contains`)distinct?⬜empty?❌ (exists in PHP)every?✅ (see `every`)not-every?✅ (see `not_every`)some✅not-any?✅ (see `not_any`)get✅assoc⬜dissoc⬜merge⬜ (will alias `array_merge` and make non-destructive)merge-with⬜first✅last✅rest✅butlast✅map✅filter✅reduce✅ (note: arity of 'initial' arg preserved)remove✅concat✅reverse✅ (alias of `array_reverse`)interleave✅ (alias of `implode`, not lazy)interpose✅ (not lazy)zipmap⬜ (will alias `array_combine`)frequencies⬜ (will alias `array_count_values`)select-keys✅ (see `select_keys`)keys⬜ (will alias `array_keys`)vals⬜ (will alias `array_values`)find⬜ (maybe, could be duplicative of `get`)update-in⬜seq⬜ (could be useful for nil punning, maybe not)rand-nth⬜second✅take⬜ (not lazy)take-last⬜ (not lazy)take-nth⬜ (not lazy)take-while⬜ (not lazy)drop⬜ (not lazy)drop-last⬜ (not lazy)drop-while⬜ (not lazy)keep⬜ (not lazy)keep-indexed⬜ (not lazy)distinct⬜ (will alias `array_unique`, not lazy)group-by⬜partition⬜ (not lazy)partition-all⬜ (not lazy)partition-by⬜split-at⬜split-with⬜replace⬜shuffle❌ (`shuffle` exists, may provide another version?)reductions⬜mapcat✅max-key⬜min-key⬜### numbers

[](#numbers)

fnsupportpos?⬜zero?⬜neg?⬜identical?⬜ (undecided)nil?⬜ (could be equivalent to `is_null`)even?✅ (see `even`)odd?✅ (see `odd`)max❌ (exists in PHP)min❌ (exists in PHP)quot✅rem⬜mod(will alias `%` operator)inc⬜dec⬜max❌ (exists in PHP)min❌ (exists in PHP)### functions

[](#functions)

fnsupportcomplement✅comp✅juxt✅apply✅ (alias of `call_user_func_array`)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

---

Top Contributors

[![blackwood](https://avatars.githubusercontent.com/u/10198953?v=4)](https://github.com/blackwood "blackwood (31 commits)")

### Embed Badge

![Health badge](/badges/vervel-vervel/health.svg)

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

PHPackages © 2026

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