Using output buffer functions:
function testFunctionOutput($f, $p = array()){
ob_start();
call_user_func_array($f, $p);
$s = ob_get_contents();
ob_end_flush();
return (bool)($s !== '');
}
So say...
function testa(){
echo 'test';
}
function testb($b){
$i = 20 * $b;
return $i;
}
var_dump(testFunctionOutput('testa'));
var_dump(testFunctionOutput('testb', array(10)));
Alternative version suggested by Felix:
function testFunctionOutput2($f, $p = array()){
ob_start();
call_user_func_array($f, $p);
$l = ob_get_length();
ob_end_clean();
return (bool)($l > 0);
}