I was always wondering is there any way to "include" or "require" another php file that contains both the main code and functions without executing the main code (so to use an ordinary php script with some functions in there as a library)? Or at least suppress the stdout thrown by the main code from the file included?
The is a design issue, if you have functions common to more than one page you should put the functions in a separate file and include it from both pages.