You should be able to use an Anonymous Function (aka Closure) with a call to the parent scoped $delimiter variable, like so:
$callbacks[$delimiter] = function($matches) use ($delimiter) {
return $delimiter . strtolower($matches[1]);
};
You should be able to use an Anonymous Function (aka Closure) with a call to the parent scoped $delimiter variable, like so:
$callbacks[$delimiter] = function($matches) use ($delimiter) {
return $delimiter . strtolower($matches[1]);
};