不灭的焱

加密类型:SHA/AES/RSA下载Go
复合类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel)、接口(interface)、数组(array)、结构体(struct) Go类型+零值nil
引用类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel) Go引用

作者:AlbertWen  添加时间:2015-11-28 10:47:44  修改时间:2025-11-18 05:11:03  分类:13.C/C++/Rust  编辑

PHP_FE宏替换过程:

PHP扩展研究之 PHP_FE 宏替换过程:

// zend函数入口
const zend_function_entry helloworld_functions[] = {
    // PHP_FE(array_max,NULL)  // 此处和下面写法效果相等
    {
        "array_max", 
        zif_array_max, 
        NULL, 
        (zend_uint)(sizeof(NULL) / sizeof(struct _zend_arg_info) - 1), 
        0
    },
    PHP_FE_END    /* Must be the last line in helloworld_functions[] */
};

替换之前:

PHP_FE(array_max,NULL)

1次替换:

ZEND_FE(array_max,NULL)

2次替换:

ZEND_FENTRY(array_max, zif_array_max, NULL, 0)

3次替换:

ZEND_FENTRY(array_max, zif_array_max, NULL, 0)

4次替换:

{ 
    'array_max', 
    zif_array_max, 
    NULL, 
    (zend_uint) (sizeof(NULL) / sizeof(struct _zend_arg_info)-1), 
    0 
},