题
PHP中有很多功能可用于脚本。扩展作者是否可以以某种方式使用此功能?我真的很想使用多重函数,但找不到示例。
解决方案
你可以接受 EXIF模块 举个例子。它还取决于MBSTRING模块,并将其功能称为“直接”,即没有类似的功能 call_user_function_ex(...)
例如
ZEND_INI_MH(OnUpdateEncode)
{
#if EXIF_USE_MBSTRING
if (new_value && strlen(new_value) && !php_mb_check_encoding_list(new_value TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal encoding ignored: '%s'", new_value);
return FAILURE;
}
#endif
return OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC);
}
不隶属于 StackOverflow