php为什么要用c来扩展

如题所述

1、首先编写一个函数定义文件,该文件编写函数原型后缀为def,假设为:caleng_module.def
int a(int x, int y)
string b(string str, int n)
2、通过扩展骨架生成器,将在ext目录下自动建立扩展目录caleng_module
#> ./ext_skel --extname=caleng_module --proto=caleng_module.def
3、修改配置文件: #> vim /software/php-5.2.13/ext/caleng_module/config.m4,将如下行的注释标签"dnl"去掉,修改后如下所示:
PHP_ARG_ENABLE(myfunctions, whether to enable myfunctions support,
Make sure that the comment is aligned:
[ --enable-myfunctions Enable myfunctions support])
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-01-27
c比较快,并且在底层

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网