snowsoft / zephir

Zephir is a compiled high level language aimed to the creation of C-extensions for PHP

Home Page:https://zephir-lang.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zephir

Dependency Status Latest Stable Version Total Downloads License Build on Linux Build on Windows

Zephir - Ze(nd Engine) Ph(p) I(nt)r(mediate) - is a high level language that eases the creation and maintainability of extensions for PHP. Zephir extensions are exported to C code that can be compiled and optimized by major C compilers such as gcc/clang/vc++. Functionality is exposed to the PHP language.

Main features:

  • Both dynamic/static typing
  • Reduced execution overhead compared with full interpretation
  • Restricted procedural programming, promoting OOP
  • Memory safety
  • Ahead-of-time (AOT) compiler to provide predictable performance

Compiler design goals:

  • Multi-pass compilation
  • Type speculation/inference
  • Allow runtime profile-guided optimizations, pseudo-constant propagation and indirect/virtual function inlining

Requirements

To compile Zephir Parser:

To build the PHP extension:

  • g++ >= 4.4 | clang++ >= 3.x | vc++ >= 11
  • GNU make >= 3.81
  • automake
  • PHP development headers and tools

Installation

First, you have to get Zephir Parser.

Windows

To install Zephir on Windows follow this guide.

Linux | macOS | BSD | Solaris

Git way

Clone Zephir repository.

Then, install Zephir by using command ./install from project root dir. For global installation add -c flag.

Composer way

You can install Zephir using composer.

To get Zephir, run composer require phalcon/zephir. After getting Zephir follow the above guide to install Zephir Parser.

Additional notes on Ubuntu

The following packages are needed in Ubuntu:

  • apt-get install re2c libpcre3-dev

Usage

Compile the extension:

zephir compile

External Links

Contributing

See CONTRIBUTING.md for details about contributions to this repository.

License

Zephir is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

About

Zephir is a compiled high level language aimed to the creation of C-extensions for PHP

https://zephir-lang.com/

License:Other


Languages

Language:C 48.2%Language:PHP 45.6%Language:Zephir 3.9%Language:C++ 1.6%Language:HTML 0.3%Language:M4 0.1%Language:CSS 0.1%Language:Shell 0.1%Language:JavaScript 0.1%Language:Batchfile 0.0%