Converts PHP 7 files to Zephir zep files and can create Zephir prototype files of external used libraries.
- PHP >= 7.1
$ composer require --dev sandrokeil/php-to-zephir To create Zephir zep files of your PHP files run:
$ bin/php2zephir php2zephir:zep:create [source path/file] [destination path/file] To create Zephir prototypes for external libraries run:
$ bin/php2zephir php2zephir:prototype:create [source path/file] [destination file prototype.php] A PHAR file can be generated with box.
$ php box.phar compile $ docker-compose run --rm php vendor/bin/phpunit If you want to compile your Zephir zep files for PHP Alpine 3.8 Docker images try my Zephir Docker images.
- Can not handle reserved variable names like
$resource, it would result in compilation error