← All docs
mb_ereg_replace_callback()
Replaces multibyte regex matches with the string result of a callback receiving all captures.
mb_ereg_replace_callback()
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null
Replaces multibyte regex matches with the string result of a callback receiving all captures.
Parameters:
$pattern(string)$callback(callable)$string(string)$options(?string), defaultnull, optional
Returns: string|false|null
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/mb_ereg_replace_callback.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_ereg_replace_callback is implemented in the compiler, see the internals page.