There's a lot of functionality available in PHP for scripts. Is this functionality available somehow to the extension writer? I'd really like to use the multibyte functions but can't find an example thereof.
+2
A:
You can take the exif module as an example. It also depends on the mbstring module and calls its functions "directly", i.e. without something like call_user_function_ex(...)
e.g.
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);
}
VolkerK
2010-10-18 07:49:58
Perfect! Thanks very much! Big green tick for you!
boost
2010-10-19 13:59:15