phxlang/phx

AST-based syntax extension for PHP

1.0.0-alpha1 2017-08-13 07:20 UTC

This package is not auto-updated.

Last update: 2024-04-14 01:41:27 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.