Optimization of PHP code via runtime benchmarking is straight forward. Keep track of $start and $end times via microtime() around a code block - I am not looking for an answer that involves microtime() usage.
What I would like to do is measure the time it takes PHP to get prepared to run it's code - code-parse/op-code-tree-building time. My reasoning is that while it's easy to just include() every class that you might need for every page that you have on a site, the CPU overhead can't be "free". I'd like to know how "expensive" parse time really is.
I am assuming that an opcode cache such as APC is not part of the scenario.
Would I be correct that measurement of parse time in PHP is something that would have to take place in mod_php?
EDIT: If possible, taking into account $_SERVER['DOCUMENT_ROOT'] usage in code would be helpful. Command solutions might take a bit of tinkering to do this (but still be valuable answers).