制御構造の中に function を書いてるやつがいるんだけど、
これありなの?

if (なんたら){
 なんたら
} else {
 function hoge(){
  なんたら
}
 略
 $a = hoge();
 以下略
}