How to incorrectly modify $matches in preg_replace_callback_array callback function?
preg_replace_callback_array is a very powerful function in PHP. It allows you to map regular expressions and callback functions of an array, and you can control callback functions more flexibly when replacing strings. Nevertheless, sometimes developers may accidentally modify the $matches array incorrectly when using the callback function, resulting in unpredictable results. This article will use an example to show how to incorrectly modify $matches in the preg_replace_callback_array callback function.
preg_replace_callback_array