Phel is a functional programming language that compiles to PHP — a modern Lisp dialect inspired by Clojure and Janet, bringing functional elegance and expressive code to PHP development.
See Phel in Action
(ns my\example) (def my-name "world") (defn print-name [your-name] (print "hello" your-name)) (print-name my-name)Key Features of Phel
Built for modern PHP development with functional programming principles
Built on PHP Ecosystem
Runs on the PHP ecosystem with access to all existing libraries
- • Seamless PHP interoperability
- • Access to Composer packages
- • Familiar deployment patterns
Immutable Data Structures
Built-in persistent data structures like Lists, Vectors, Maps, and Sets
- • Structural sharing for performance
- • Thread-safe by default
- • Minimal, readable Lisp syntax
Macro System
Advanced metaprogramming capabilities for code generation
- • Powerful macro system
- • Code as data philosophy
- • Extensible language constructs
Interactive REPL
Interactive REPLs for iterating and prototyping
- • Live code evaluation
- • Rapid prototyping
- • Interactive development
Lisp-inspired Syntax
Clean, expressive, and easy to pick up syntax
- • Minimal, readable syntax
- • Homoiconicity benefits
- • Expressive and concise
Modern Tooling
Comprehensive development tools and ecosystem
- • Plugin support
- • Package management
- • Testing frameworks
Why Choose Phel for Functional Programming in PHP?
Phel started as an experiment in writing functional PHP and quickly turned into its own thing.
A Lisp-inspired functional language
That runs on affordable PHP hosting
That's expressive, debug-friendly, and easy to pick up
If you've ever wished PHP was a bit more... functional, Phel is for you.
Try Phel Instantly with Docker
No setup? No problem. You can run Phel's REPL right away:
docker run -it --rm phellang/repl
.png)
