PHPackages                             iceframework/zephir-parser - 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. iceframework/zephir-parser

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

iceframework/zephir-parser
==========================

The Zephir Parser delivered as a C extension for the PHP language.

1.7.0(1y ago)12.4k1MITCPHP &gt;=7.0CI failing

Since Mar 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ice/zephir-parser)[ Packagist](https://packagist.org/packages/iceframework/zephir-parser)[ Docs](https://zephir-lang.com)[ RSS](/packages/iceframework-zephir-parser/feed)WikiDiscussions development Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (13)Used By (1)

Zephir Parser
=============

[](#zephir-parser)

[![Actions Status](https://github.com/zephir-lang/php-zephir-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/zephir-lang/php-zephir-parser/actions)[![Coverage Status](https://camo.githubusercontent.com/71e6f2d691a7fb5938cd9bf3ab333aca9f3b5787ea637b8a92cba14ba725c3b9/68747470733a2f2f636f6465636f762e696f2f67682f7a65706869722d6c616e672f7068702d7a65706869722d7061727365722f6272616e63682f646576656c6f706d656e742f67726170682f62616467652e737667)](https://codecov.io/gh/zephir-lang/php-zephir-parser)[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/zephir-lang/php-zephir-parser/blob/master/LICENSE)[![Discord](https://camo.githubusercontent.com/303a93cc6ad0be6ecad7ed7edcd0e47a16c6c61c5c3d7233782dd06cf387cf1a/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3331303931303438383135323337353239373f6c6162656c3d446973636f7264266c6f676f3d646973636f7264)](http://phalcon.io/discord)

The Zephir Parser delivered as a C extension for the PHP language.

Supported PHP versions: **7.0**, **7.1**, **7.2**, **7.3**, **7.4**, **8.0**, **8.1** and **8.2**

**NOTE:** The [`development`](https://github.com/zephir-lang/php-zephir-parser/tree/development)branch will always contain the latest **unstable** version. If you wish to check older versions or formal, tagged release, please switch to the relevant [branch](https://github.com/zephir-lang/php-zephir-parser/branches)/[tag](https://github.com/zephir-lang/php-zephir-parser/tags).

Get Started
-----------

[](#get-started)

**Build Requirements**

Prerequisite packages are:

- OS: Linux || Solaris || FreeBSD || macOS || Windows
- Compiler: `g++` &gt;= 4.4 || `clang++` &gt;= 3.x || `vc++` &gt;= 11
- [`re2c`](http://re2c.org) &gt;= 0.13.6

To build extension from the source you will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.

### PECL

[](#pecl)

```
pecl install zephir_parser

```

### Windows

[](#windows)

To install Zephir Parser on Windows:

1. Download [Zephir Parser for Windows](https://github.com/zephir-lang/php-zephir-parser/releases/latest)
2. Extract the DLL file and copy it to your PHP extensions directory
3. Edit your `php.ini` file and add this line: ```
    [Zephir Parser]
    extension=php_zephir_parser.dll
    ```

### Linux

[](#linux)

On a Linux/Unix-based platform you can easily compile and install the extension from sources.

For Linux/Unix-based based systems you'll need also:

- [GNU make](https://www.gnu.org/software/make) 3.81 or later
- [autoconf](https://www.gnu.org/software/autoconf/autoconf.html) 2.31 or later
- [automake](https://www.gnu.org/software/automake) 1.14 or later

#### Ubuntu

[](#ubuntu)

```
sudo apt-get install php7.0-dev gcc make re2c autoconf automake
```

#### Suse

[](#suse)

```
sudo zypper install php7.0-devel gcc make re2c autoconf automake
```

### CentOS/Fedora/RHEL

[](#centosfedorarhel)

```
sudo yum install php-devel gcc make re2c autoconf automake
```

General Compilation
-------------------

[](#general-compilation)

Follow these instructions to generate a binary extension for your platform:

```
git clone git://github.com/zephir-lang/php-zephir-parser.git
cd php-zephir-parser
phpize
./configure
make
sudo make install
```

If you have multiple/specific PHP versions installed, you may be able to specify for which installation you'd like to build by using the `--with-php-config` option during configuration. For example:

```
git clone git://github.com/zephir-lang/php-zephir-parser.git
cd php-zephir-parser
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
sudo make install
```

Add the extension to your `php.ini`:

```
[Zephir Parser]
extension=zephir_parser.so
```

Usage
-----

[](#usage)

```
$program =
