- 在扩展模板中添加 PHP_RINIT 和 PHP_RSHUTDOWN 函数实现 - 配置模块入口结构以启用请求初始化和关闭回调 - 更新主程序初始化逻辑以使用模块生命周期函数 - 实现请求启动和关闭时的应用程序初始化清理功能 - 解决 PHP 内部字符串处理的双释放问题 - 简化示例代码以演示全局变量访问功能pull/1/head
parent
6632629f58
commit
5b44e4d390
4 changed files with 23 additions and 6 deletions
@ -0,0 +1,20 @@ |
|||||||
|
#include <phpx.h> |
||||||
|
|
||||||
|
extern zend_class_entry *php_get_class(int class_id, const char *class_name); |
||||||
|
extern zend_function *php_get_func(int func_id, const char *func_name); |
||||||
|
|
||||||
|
static inline php::Variant CALL(int func_id, const char *func_name, const std::initializer_list<php::Variant> &args) { |
||||||
|
return php::call(php_get_func(func_id, func_name), args); |
||||||
|
} |
||||||
|
|
||||||
|
static inline php::Variant CALL(int func_id, const char *func_name) { |
||||||
|
return php::call(php_get_func(func_id, func_name)); |
||||||
|
} |
||||||
|
|
||||||
|
static inline php::Variant CALL_SILENT(int func_id, const char *func_name, const std::initializer_list<php::Variant> &args) { |
||||||
|
return php::silentCall(php_get_func(func_id, func_name), args); |
||||||
|
} |
||||||
|
|
||||||
|
static inline php::Variant CALL_SILENT(int func_id, const char *func_name) { |
||||||
|
return php::silentCall(php_get_func(func_id, func_name)); |
||||||
|
} |
||||||
Loading…
Reference in new issue