Another way to handle this that removes any need for includes at all is to use the autoload feature. Including everything your script needs "Just in Case" can impede performance. If your includes are all class or interface definitions, and you want to load them only when needed, you can overload the __autoload()
function with your own code to find the appropriate class file and load it only when it's called. Here is the example from the manual:
function __autoload($class_name) {
require_once $class_name . '.php';
}
$obj = new MyClass1();
$obj2 = new MyClass2();
As long as you set your include_path variables accordingly, you never need to include a class file again.