My webapp has a buch of modules. Each module has a \'main\' php script which loads submodules based on a query sent to the main module:
//file: clientes.php
Short and simple (for CLI):
if (__FILE__ == realpath($argv[0])) main();