I have an anonymous function:
$rules = array(
'asdf' => array('required'),
'zxcv' => array('function ($data) {
return strtoupper($data); }'),
);
found in the the 'zxcv' key of the $rules array. I need to call this function and I've already tried a few things including:
$rules['zxcv']('mydata');
and
array_map($rules['zxcv'], 'mydata');
and
call_user_func($rules['zxcv'], 'mydata'); to no avail
any help would be appreciated