mb_ereg_replace_callback

PHP 5 >= 5.4.1, PHP 7, PHP 8
mb_ereg_replace_callback - Perform a regular expression search and replace with multibyte support using a callback
Manual
Code Examples

Example #1 mb_ereg_replace_callback example

Result: April fools day is 04/01/2003 Last christmas was 12/24/2002
PHP Version:

Example #2 mb_ereg_replace_callback using anonymous function

PHP Version: