As an example, you can take an exif module . It also depends on the mbstring module and calls its functions "directly", that is, without something like call_user_function_ex (...)
eg.
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);
}
source
share