PHPackages                             phel-lang/phel-lang - 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. phel-lang/phel-lang

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

phel-lang/phel-lang
===================

Phel is a functional programming language that compiles to PHP

v0.30.0(1mo ago)4743.5k—0%219MITPHPPHP &gt;=8.3CI passing

Since Jan 31Pushed 1mo ago9 watchersCompare

[ Source](https://github.com/phel-lang/phel-lang)[ Packagist](https://packagist.org/packages/phel-lang/phel-lang)[ Docs](https://phel-lang.org/)[ Fund](https://chemaclass.com/sponsor)[ RSS](/packages/phel-lang-phel-lang/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (24)Versions (85)Used By (9)

 [![Phel logo](logo_readme.svg)](logo_readme.svg)

 [ ![GitHub Build Status](https://github.com/phel-lang/phel-lang/workflows/CI/badge.svg) ](https://github.com/phel-lang/phel-lang/actions) [ ![Scrutinizer Code Quality](https://camo.githubusercontent.com/0a42574d39e1693642b76c3fcbd02cc4940b7d4a79f735531d80767602f02271/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068656c2d6c616e672f7068656c2d6c616e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e) ](https://scrutinizer-ci.com/g/phel-lang/phel-lang/?branch=main) [ ![Scrutinizer Code Coverage](https://camo.githubusercontent.com/0f748044953379d57df32430e5539a032c69d5ce3f868c061b7abbae84c81c1b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068656c2d6c616e672f7068656c2d6c616e672f6261646765732f636f7665726167652e706e673f623d6d61696e) ](https://scrutinizer-ci.com/g/phel-lang/phel-lang/?branch=main) [ ![Psalm Type-coverage Status](https://camo.githubusercontent.com/8ea7485a3e886ee8322e6aba025cd062ab119c01ad093684dd30ba27d4a7887a/68747470733a2f2f73686570686572642e6465762f6769746875622f7068656c2d6c616e672f7068656c2d6c616e672f636f7665726167652e737667) ](https://shepherd.dev/github/phel-lang/phel-lang) [ ![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667) ](https://deepwiki.com/phel-lang/phel-lang)

---

Phel is a functional, [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language))-inspired programming language that compiles to PHP. It brings the expressive power of [Clojure](https://clojure.org/) and the simplicity of [Janet](https://janet-lang.org/) to the PHP ecosystem — enabling you to write concise, immutable, and composable code that runs anywhere PHP does.

#### Example

[](#example)

```
; Define a namespace
(ns my\example)

; Define a variable with name "my-name" and value "world"
(def my-name "world")

; Define a function with name "print-name" and one argument "your-name"
(defn print-name [your-name]
  (print "hello" your-name))

; Call the function
(print-name my-name)
```

Documentation
-------------

[](#documentation)

### Getting Started

[](#getting-started)

- [Quick Start Tutorial](docs/quickstart.md)Get up and running in 5 minutes with your first Phel application.
- [Installation](https://phel-lang.org/documentation/getting-started/)Detailed installation guide and project setup.

### Learning Resources

[](#learning-resources)

- [Common Patterns](docs/patterns.md)Idiomatic Phel code patterns for everyday tasks.
- [PHP/Phel Interop](docs/php-interop.md)Complete guide to working between PHP and Phel code.
- [Reader Shortcuts](docs/reader-shortcuts.md)Reference for all special syntax and reader macros.
- [Lazy Sequences](docs/lazy-sequences.md)Performance patterns and common pitfalls.
- [Mocking Guide](docs/mocking-guide.md)Testing with mocks and test doubles.
- [Examples](docs/examples/README.md)Runnable code samples covering key features.

### Reference

[](#reference)

- [Website](https://phel-lang.org)Official website with tutorials, exercises, and blog posts.
- [Packagist](https://packagist.org/packages/phel-lang/phel-lang)Official PHP package repository.
- [Internals](docs/internals/compiler.md)Deep dive into the compiler architecture.

Build PHAR
----------

[](#build-phar)

Run the following command to create a standalone PHAR executable:

```
./build/phar.sh
```

The generated `build/out/phel.phar` can then be executed directly.

Contribute
----------

[](#contribute)

Please refer to [CONTRIBUTING.md](https://github.com/phel-lang/phel-lang/blob/main/.github/CONTRIBUTING.md) for information on how to contribute to Phel. For a quick overview of project layout, tooling, and review expectations, visit the [Repository Guidelines](AGENTS.md).

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance91

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% 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 ~43 days

Recently: every ~32 days

Total

44

Last Release

49d ago

PHP version history (5 changes)v0.1.0PHP &gt;=7.4

v0.6.0PHP &gt;=8.0

v0.8.0PHP &gt;=8.0.2

v0.13.0PHP &gt;=8.2

v0.19.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d166420c6770c5941e10bd68b2d26501eabb432e280d8e6eba0a344bcc1e5ae?d=identicon)[Chemaclass](/maintainers/Chemaclass)

![](https://www.gravatar.com/avatar/95f5516d8a75725d151587359acd6914d0d35fc1b874334347ee80d726b291de?d=identicon)[jenshaase](/maintainers/jenshaase)

---

Top Contributors

[![Chemaclass](https://avatars.githubusercontent.com/u/5256287?v=4)](https://github.com/Chemaclass "Chemaclass (2357 commits)")[![jenshaase](https://avatars.githubusercontent.com/u/176220?v=4)](https://github.com/jenshaase "jenshaase (689 commits)")[![JesusValeraDev](https://avatars.githubusercontent.com/u/6381924?v=4)](https://github.com/JesusValeraDev "JesusValeraDev (245 commits)")[![jasalt](https://avatars.githubusercontent.com/u/2306521?v=4)](https://github.com/jasalt "jasalt (32 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (31 commits)")[![plaffitt](https://avatars.githubusercontent.com/u/23403270?v=4)](https://github.com/plaffitt "plaffitt (23 commits)")[![smeghead](https://avatars.githubusercontent.com/u/112476?v=4)](https://github.com/smeghead "smeghead (23 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (10 commits)")[![SauronBot](https://avatars.githubusercontent.com/u/82400622?v=4)](https://github.com/SauronBot "SauronBot (7 commits)")[![cgrabenstein](https://avatars.githubusercontent.com/u/6358948?v=4)](https://github.com/cgrabenstein "cgrabenstein (6 commits)")[![antonio-gg-dev](https://avatars.githubusercontent.com/u/13595197?v=4)](https://github.com/antonio-gg-dev "antonio-gg-dev (5 commits)")[![t-matsudate](https://avatars.githubusercontent.com/u/41981585?v=4)](https://github.com/t-matsudate "t-matsudate (3 commits)")[![lhsazevedo](https://avatars.githubusercontent.com/u/7695608?v=4)](https://github.com/lhsazevedo "lhsazevedo (3 commits)")[![geoffreyvanwyk](https://avatars.githubusercontent.com/u/194185?v=4)](https://github.com/geoffreyvanwyk "geoffreyvanwyk (3 commits)")[![dominikb](https://avatars.githubusercontent.com/u/28777818?v=4)](https://github.com/dominikb "dominikb (3 commits)")[![aszenz](https://avatars.githubusercontent.com/u/25319264?v=4)](https://github.com/aszenz "aszenz (2 commits)")[![kambo-1st](https://avatars.githubusercontent.com/u/6493048?v=4)](https://github.com/kambo-1st "kambo-1st (2 commits)")[![p810](https://avatars.githubusercontent.com/u/3998736?v=4)](https://github.com/p810 "p810 (2 commits)")[![peeley](https://avatars.githubusercontent.com/u/30942198?v=4)](https://github.com/peeley "peeley (1 commits)")

---

Tags

clojurecompilerdslfunctional-programmingimmutabilitylanguagelispmacrosphelphel-langphpphp-developerphp-langprogramming-languagerepls-expressionschemetranspilerlanguagefunctionallispphel

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phpoption/phpoption

Option Type for PHP

2.7k541.2M159](/packages/phpoption-phpoption)[lstrojny/functional-php

Functional primitives for PHP

2.0k7.3M48](/packages/lstrojny-functional-php)[nikic/iter

Iteration primitives using generators

1.1k5.9M38](/packages/nikic-iter)[patrickschur/language-detection

A language detection library for PHP. Detects the language from a given text string.

8513.2M18](/packages/patrickschur-language-detection)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)

PHPackages © 2026

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