Skip to content
/ phx Public

AST-based syntax extension for PHP 🙊

Notifications You must be signed in to change notification settings

phxlang/phx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHX

PHX (PHP NeXt) is a language extension of PHP. While PHP is fully supported by PHX it adds some additional syntax to the existing syntax set of PHP which increases productivity and readability of common PHP code.

Installation

Install PHX simply by adding the dependency to the project's composer.json.

composer require phxlang/phx

Or install it globally:

composer global require phxlang/phx

Usage

Standalone

There's a phx binary which takes a file path as the first argument which will be the PHX script to be executed:

$ vendor/bin/phx your_script.phx

With Composer

If you want to use PHX with composer autoloading please install the phx/composer-phx-plugin. It will add PHX autoloading support to composer.

Tests

Yes there are a few integration tests. Run them in the project root:

$ vendor/bin/phpunit

Documentation

There's a doc dir with useful information.