Feel free to ask questions and join discussions on the Phel Gitter channel.
Phel is a result of my failed attempts to do functional programming in PHP. Basically I wanted:
The following example gives a short impression on how Phel looks like:
# 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. Read the Getting Started Guide to create your first Phel program.
Phel has not been released yet, but it is fairly complete. In the next weeks or months I will probably find some more edge cases that I will fix before the first official release. Maybe some of you are willing to test it out and give feedback.