phxlang / phx
AST-based syntax extension for PHP
Requires
- nikic/php-parser: ^3.0
Requires (Dev)
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2025-03-02 06:35:43 UTC
README
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.