开发者

How do I create an empty op_array?

开发者 https://www.devze.com 2023-01-30 09:46 出处:网络
In my PHP extension, how can I create a开发者_StackOverflow社区n op_array with no opcodes in it?You can use init_op_array(), declared in from zend_compile.h:

In my PHP extension, how can I create a开发者_StackOverflow社区n op_array with no opcodes in it?


You can use init_op_array(), declared in from zend_compile.h:

zend_op_array * op_array = emalloc(sizeof(zend_op_array));
init_op_array(op_array, type, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);

type can be ZEND_EVAL_CODE or ZEND_USER_FUNCTION.

0

精彩评论

暂无评论...
验证码 换一张
取 消