変数に評価式を入れて
それをifに渡してやることって可能ですか?

以下のようなイメージです。

$f = 'is_string($str) && strlen($str) > 0';
if($f){
  // 文字列
}else{
  // それ以外
}