Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 PHP 扩展中,如何创建一个没有操作码的 op_array?
您可以使用在 zend_compile.h 中声明的 init_op_array():
zend_op_array * op_array = emalloc(sizeof(zend_op_array)); init_op_array(op_array, type, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
类型可以是 ZEND_EVAL_CODE 或 ZEND_USER_FUNCTION。