安装Zephir
1 | git clone https://github.com/phalcon/zephir.git |
检测是否安装成功,若不成功安装php-zephir-parser
1 | zephir help |
安装 php-zephir-parser
若报错提示缺少这个,安装php-zephir-parser
1 | sudo yum install php-devel gcc make re2c autoconf #安装依赖 |
添加至php.ini,重启
1 | [Zephir Parser] |
开发第一个php扩展
1 | zephir init tools |
tools.zep
1 | namespace Tools; |
编译安装
1 | zephir build |
添加至php.ini,重启
1 | [Zephir Parser] |
测试运行
1 | $data = ['test'=>666,'test666'=>333]; |