sandrokeil/php-to-zephir

Convert PHP 7 files to Zephir zep files

dev-master 2020-04-08 19:48 UTC

This package is auto-updated.

Last update: 2024-10-09 05:48:20 UTC


README

Build Status Coverage Status

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