项目作者: sandrokeil

项目描述 :
Convert PHP 7 files to Zephir zep files and create a native PHP extension
高级语言: PHP
项目地址: git://github.com/sandrokeil/php-to-zephir.git
创建时间: 2018-11-19T19:59:58Z
项目社区:https://github.com/sandrokeil/php-to-zephir

开源协议:Other

下载


PHP to Zephir

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

  1. $ composer require --dev sandrokeil/php-to-zephir

Usage

To create Zephir zep files of your PHP files run:

  1. $ bin/php2zephir php2zephir:zep:create [source path/file] [destination path/file]

To create Zephir prototypes for external libraries run:

  1. $ bin/php2zephir php2zephir:prototype:create [source path/file] [destination file prototype.php]

Create PHAR

A PHAR file can be generated with box.

  1. $ php box.phar compile

Unit Tests

  1. $ 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