phel-lang / phel-lang
Phel is a functional programming language that compiles to PHP
Fund package maintenance!
chemaclass.com/sponsor
Installs: 2 824
Dependents: 14
Suggesters: 0
Security: 0
Stars: 456
Watchers: 9
Forks: 22
Open Issues: 3
pkg:composer/phel-lang/phel-lang
Requires
- php: >=8.3
- gacela-project/gacela: ^1.10
- phpunit/php-timer: ^6.0
- symfony/console: ^7.3
Requires (Dev)
- ext-readline: *
- ergebnis/composer-normalize: ^2.48
- friendsofphp/php-cs-fixer: ^3.88
- phpbench/phpbench: ^1.4
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- psalm/plugin-phpunit: ^0.19
- rector/rector: ^2.1
- symfony/var-dumper: ^7.3
- vimeo/psalm: ^5.26
- dev-main
- v0.23.1
- v0.23.0
- v0.22.2
- v0.22.1
- v0.22.0
- v0.21.0
- v0.20.0
- v0.19.1
- v0.19.0
- v0.18.1
- v0.18.0
- v0.17.0
- v0.16.1
- v0.16.0
- v0.15.3
- v0.15.2
- v0.15.1
- v0.15.0
- v0.14.1
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.0
- dev-feat/970-load-form
- dev-feat/core-conj
- dev-feat-add-getphelfunctions-fnsignature-docstring
- dev-feat/create-phar
- dev-codex/fix-broken-macro-definitions-in-user-namespace
- dev-feat/support-php83
This package is auto-updated.
Last update: 2025-10-11 12:55:06 UTC
README
Phel is a functional, Lisp-inspired programming language that compiles to PHP. It brings the expressive power of Clojure and the simplicity of Janet to the PHP ecosystem — enabling you to write concise, immutable, and composable code that runs anywhere PHP does.
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
- Website
Discover features, tutorials, exercises, and the latest blog posts. - Installation
Get started quickly with scaffolding or manual installation. - Packagist
Find Phel on the official PHP package repository. - Internals
Learn more about the compiler’s inner workings. - Examples
Explore practical scripts you can run directly with the Phel CLI.
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
Please refer to 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.