You could just use a php include statement. But if what you're interested in is capturing the output of that code in a string, then you'd use ob_start()/ob_end_clean() around the include, like:
Code:
ob_start();
include('path/to/this/file/myfile.php');
$includedphp = ob_get_contents();
ob_end_clean();
then $includedphp would contain the output of the included file.
If you don't need the output, then you don't need anything except the include.
Edit: Well, that's not exactly correct. If there is no output from the included file then you just need the include line. If there is output then you need to capture it even if you don't need it.