The First issue here is Intent. Well, the 2nd Argument passed to preg_replace_callback($arg1, $arg2...)
is expected to be a Callable. That is why you have that error. It is unclear where you are going with your code but perhaps the code below could throw more light and help you either rethink/clarify your question, intent + goal or revisit your code. Consider this:
<?php
$string = "ৎ whatever ᛮ again whatever ọ";
$modSettings = array('disableEntityCheck'=>array());
$func = array(
"fix_stuff" => function($param=20){ echo $param;},
"do_stuff" => function($param=10){ echo $param;},
"entity_fix" => function($matches ){ return $matches[0] . "YES!!! ";},
);
$ent_check = empty($modSettings['disableEntityCheck']) ? array(preg_replace_callback('#\d#', $func['entity_fix'], $string )) : array('', '');
var_dump($ent_check);
// DISPLAYS
array (size=1)
0 => string 'YES!!! 5YES!!! 1YES!!! 0YES!!! whatever YES!!! 8YES!!! 7YES!!! 0YES!!! again whatever YES!!! 8YES!!! 8YES!!! 5YES!!! '
Notice that in the code above, the 2nd Argument passed to preg_replace_callback
is a function though passed as a REFERENCE to the 'entity_fix' Key of the array: $func. This was intended to highlight the fact that it is also possible to pass the 2nd Argument in such a manner. It is hoped that this here gives you a little tip to kick off ;-)
Good Luck!!!