I am working on making a PHP Framework, mostly as a learning experience and to test my knowledge about what is ‘smart’ for a framework.
One thing I find puzzling is the bootstrap, I understand it’s a great place to start sessions, set up a registry and have other things to start up your application.
However, what I don’t understand is… why not put that in the index.php?
In my experience, both the bootstrap and the index.php are small files. Sometimes the bootstrap is quite large but the index never is.
So why would I bother with a separate bootstrap file?
For anything your code, you can put it into as many files as you like. If you dislike separating code into files because of their meaning (modularity), then just mesh everything into one file.
Clever persons however separate stuff (modularity). If modular becomes a hindrance, they just use automation (see build automation) to just build one file out of multiple.
So the only one who can answer your question is you. Therefore please decide on your own:
The important part is that you think about it. Try to find arguments for and against, list them next to each other. Decide.