tags: #php #preg #preg_replace #replace #callback #preg_replace_callback ## Callback The [docs](https://www.php.net/manual/en/function.preg-replace-callback.php). Summary: ```php preg_replace_callback( string|array $pattern, callable $callback, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0 ): string|array|null ``` Example (method) ```php process("See what it does to the pattern in here."); echo "$b\n"; ``` Example (function) ```php