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
# Define a namespace
# Create a variable
# Define a function
# Call the function
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.
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:
# To update to the latest version of Phel:
# docker pull phellang/repl
