sandrokeil / php-to-zephir
Convert PHP 7 files to Zephir zep files
dev-master
2020-04-08 19:48 UTC
Requires
- php: ^7.1
- nikic/php-parser: ^4.1
- symfony/console: ^2.7 || ^3.0 || ^4.0
Requires (Dev)
- malukenho/docheader: ^0.1.7
- phpunit/phpunit: ^7.4
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^2.9.1
This package is auto-updated.
Last update: 2024-10-09 05:48:20 UTC
README
Converts PHP 7 files to Zephir zep files and can create Zephir prototype files of external used libraries.
Requirements
- PHP >= 7.1
Installation
$ composer require --dev sandrokeil/php-to-zephir
Usage
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]
Create PHAR
A PHAR file can be generated with box.
$ php box.phar compile
Unit Tests
$ docker-compose run --rm php vendor/bin/phpunit
Zephir Docker Image
If you want to compile your Zephir zep files for PHP Alpine 3.8 Docker images try my Zephir Docker images.
Limitations
- Can not handle reserved variable names like
$resource
, it would result in compilation error