Phel is a functional programming language that compiles to PHP. It is a dialect of Lisp inspired by Clojure and Janet. Built on PHP, it provides a good error reporting, different Datastructures (Arrays, Tables and Tuples), Macros, recursive functions, REPL, and powerful and simple syntax.

A Hello world in Phel looks like this :

# 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)

Phel requires PHP 7.4 or higher and Composer. The implementation even if it’s not released yet, its fairly complete. That’s why you are invited to download, play with it, test it and give your feedback. you can get started with Phel language.

More information at https://phel-lang.org/, released under an MIT license.

LEAVE A REPLY

Please enter your comment!
Please enter your name here