Article About PHP Function Mb_Output_Handler
Article about php function mb_output_handler
PHP has over 1000 built-in functions which can be called directly from within a script to perform specific tasks. However, a lot of power in PHP comes from custom functions that can be written by the user. Functions are blocks of code that can be used repeatedly. Functions have arguments that are passed to them by the calling script, just like variables in PHP. This information is specified after the function name, inside the parentheses, separated by commas. Functions can also return a value, which can be an integer, float or string.
One of the most useful mbstring extensions is mb_output_handler, which allows users to convert input to output by setting a specific character encoding. This extension is very helpful if you want to make sure that all of your form submissions are encoded in the same character encoding, or if you want to ensure that all HTML output is correctly encoded.
mb_output_handler() is an ob_start() callback function that converts characters in the output buffer from internal character encoding to HTTP output character encoding. Note that if you set this function, it must be followed by a call to header() with the Content-Type header specifying a character encoding, or any binary data will be ignored and not processed correctly.
The mb_output_handler() function is EXPERIMENTAL, which means that its behaviour may change in a future release of PHP WITHOUT NOTICE. If you use this function, it is your responsibility to keep up to date with any changes made to the code.