views:

39

answers:

2

I may have some gaps in my understanding how it works, but if its like this :

client -> apache -> php (brings together all the includes(...) etc..) -> php parses the complete page -> apache -> client

then I would like to know how to see the complete page before its parsed.

(Im studying cakephp, trying to get a handle on whats called when in what order)

+1  A: 

I would not be so sure that the "brings together all the includes" step ever happens. Since include() can be called in conditional blocks (something like if ($admin==1) include("admin.php"), it means that the interpreter is already running and interpreting the commands.

naivists
True. A file is only included when the include statement is executed, not before the script starts running.
Sjoerd
True, and $filename="$_GET['filename']"; include($filename); is perfectly valid and the interpreter must have executed all code prior to the include before it can actually execute it.... though I'd not recommend using such unsafe code in a real script
Mark Baker
A: 

Use xdebug's profiler to generate a cachegrind file.

simplemotives