preg_replace_callback_array

PHP 7, PHP 8
preg_replace_callback_array - Perform a regular expression search and replace using callbacks
Manual
Code Examples

Example #1 preg_replace_callback_array example

Result: 6 matches for "a" found 3 matches for "b" found
PHP Version:


Function preg_replace_callback_array:

Regular Expressions (Perl-Compatible) Functions

Most used PHP functions