(How) Is it possible to use a variable within a callback-function? For example I'd like to use the variable $add within my callback-function:
private function addToWord($add) {
return preg_replace_callback(
'/([a-z])+/i',
function($word, $add) {
return $word.$add;
},
$this->text);
}