Is this a bad practice?
like:
function boo(){ require_once(\"class.moo.php\"); } ...
?
This is how class loaders work. This is not necessarily bad practice.
Depends on what the function does and why you are doing this. Using autoloading may be more appropriate.