Figured it out Sane, rather than doing it that way you would use
call_user_func. So that
array_filter_multi would become
function array_filter_multi($array, $callback, $filtered_output = ""){
$ret = array();
foreach($array as $key => $value){
if([i]call_user_func($callback, $key, $value)[/i]){
if(is_array($value)){
$ret[$key] = array_filter_multi($value, $callback, $filtered_output);
}elseif(is_object($value)){
$ret[$key] = array_filter_multi(get_object_vars($value), $callback, $filtered_output);
}else{
$ret[$key] = $value;
}
}else{
$ret[$key] = $filtered_output;
}
}
return $ret;
}
Then you could just write a function such as
function comparator($key, $value){
return $key < $value;
}
And finally pass it to the previous function by doing the following
array_filter_multi($data, "comparator", null);