开发一个简单的 PHP 扩展来学习 PHP 扩展开发和 PHP 内核

Build Status

安装

下载

git clone https://github.com/guanguans/guanguans-php-ext.git

编译安装

/path/to/phpize
./configure --with-php-config=/path/to/php-config
make -j && make install

php.ini 中添加

extension = guanguans.so

重启 php-fpm

systemctl restart php-fpm.service

使用

查看拓展

测试

License

Apache License 2.0