This is the 6th installment of the Drupal 7 Line by Line series of articles.
Up to this point in the series I've covered index.php, the basics of the drupal_bootstrap function and have been working through Drupal's bootstrap phases. (Links to earlier articles in the series can be found at the end of this article).
In the last article I covered the Drupal database bootstrap. In that article I mentioned the following:
[when I wrote about] page cache bootstrap process I noted that unless your site is configured in a specific way, both the DRUPAL_BOOTSTRAP_DATABASE (phase 3) and DRUPAL_BOOTSTRAP_VARIABLES (phase 4) bootstrapping phases will be completed before the page cache (phase2) bootstrap process can itself finish. As a result, I am technically covering the database bootstrapping process out of order and am not literally following the line by line code execution of Drupal exactly. I hope you can forgive me.
Keeping that in mind, today I will cover phase 4 in the bootstrap process: DRUPAL_BOOTSTRAP_VARIABLES.