This is the example code used in the Binpress Tutorial A PHP bootstrapping crash course written by Vito Tardia. Read it here: https://www.binpress.com/tutorial/php-bootstrapping-crash-course/
It can be a chore to manage script dependencies as your PHP applications grow larger and more complex. Once you've finished this crash course in bootstrapping, you'll have a basic -- yet powerful -- modern application template with simplified script dependency built in.