zephir是用c写的php扩展,
zephir或许会开启一个新的PHP编写方式。 在这之前,如果我们要编写php的扩展,一般都是c++/clang/vc等等。 但是现在,我们有了新的选择: zephir.
zephir本身并不是为了替代c++/clang/vc等。 它本质是介于c和php的之间的一个语言,一个桥梁。
下面我们开始安装。 安装环境基于CentOS 6.5,php 5.6
安装系统依赖:
yum install wget git autoconf automake libtool gcc-c++
(因为我已经安装过了所以提示nothing to do)
安装其他依赖的东西: json-c和re2c
json-c安装:
git clone https://github.com/json-c/json-c.git
cd json-c
./autogen.sh
./configure
make
make install
tar zxf re2c-0.13.7.5.tar.gz
cd re2c-0.13.7.5
./configure
make
make install
然后在任何地方执行re2c -v, 应该输出:
git clone https://github.com/phalcon/zephir.git
./install
打zephir命令显示如下,说明安装成功
zephir build