直前って何処よ。

function hogehoge() {
        ・
        ・
        ・
        echo $hoge;
        return $hoge;
}

ってやって確かめたのか?