I noticed that PHP now can use temp function definition (like js and other scripts language), but how can I get local variable in the temp function ?
ex:
function my_func($text, $prefix){
    $regex = '/xxxx/';
    return preg_replace_callback($regex, function($matches){
         // how to read $prefix here?
     }, $text);
}
 
    