PHPackages                             sandrokeil/php-to-zephir - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sandrokeil/php-to-zephir

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sandrokeil/php-to-zephir
========================

Convert PHP 7 files to Zephir zep files

291265[3 issues](https://github.com/sandrokeil/php-to-zephir/issues)PHPCI failing

Since Apr 8Pushed 6y ago2 watchersCompare

[ Source](https://github.com/sandrokeil/php-to-zephir)[ Packagist](https://packagist.org/packages/sandrokeil/php-to-zephir)[ RSS](/packages/sandrokeil-php-to-zephir/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP to Zephir
=============

[](#php-to-zephir)

[![Build Status](https://camo.githubusercontent.com/94cb3e07bc1cc64660c3d51c24f3dd3a4ee72f220784731fb66872d4fe88ad9c/68747470733a2f2f7472617669732d63692e6f72672f73616e64726f6b65696c2f7068702d746f2d7a65706869722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sandrokeil/php-to-zephir)[![Coverage Status](https://camo.githubusercontent.com/9d023092fece1e2baff84c99e577705957bb8d540aa430f9ff79f4bfe3541e0a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f73616e64726f6b65696c2f7068702d746f2d7a65706869722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/sandrokeil/php-to-zephir?branch=master)

Converts PHP 7 files to [Zephir](https://zephir-lang.com/en) zep files and can create Zephir prototype files of external used libraries.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

Installation
------------

[](#installation)

```
$ composer require --dev sandrokeil/php-to-zephir

```

Usage
-----

[](#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
-----------

[](#create-phar)

A PHAR file can be generated with [box](https://github.com/humbug/box).

```
$ php box.phar compile

```

Unit Tests
----------

[](#unit-tests)

```
$ docker-compose run --rm php vendor/bin/phpunit

```

Zephir Docker Image
-------------------

[](#zephir-docker-image)

If you want to compile your Zephir zep files for PHP Alpine 3.8 Docker images try my [Zephir Docker images](https://github.com/sandrokeil/docker-files/tree/master/zephir).

Limitations
-----------

[](#limitations)

- Can not handle reserved variable names like `$resource`, it would result in compilation error

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f3428ea5d86dde45a70842c5228d295ec37a493594d484bf1ed2552e85b791?d=identicon)[sandrokeil](/maintainers/sandrokeil)

---

Top Contributors

[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (21 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

converterextensionphpphp-extensionzepzephirzephir-languagezephir-php

### Embed Badge

![Health badge](/badges/sandrokeil-php-to-zephir/health.svg)

```
[![Health](https://phpackages.com/badges/sandrokeil-php-to-zephir/health.svg)](https://phpackages.com/packages/sandrokeil-php-to-zephir)
```

###  Alternatives

[phpjuice/slopeone

PHP implementation of the Weighted Slope One rating-based collaborative filtering scheme.

868.7k](/packages/phpjuice-slopeone)[thisisbd/silverstripe-fontawesome-iconpickerfield

Font Awesome Icon Picker for SilverStripe 3.1.x based on http://mjolnic.com/fontawesome-iconpicker

143.3k1](/packages/thisisbd-silverstripe-fontawesome-iconpickerfield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
