at runtime php complies the script into binary code. but still, since its a scripting language, it still interprets most of it afterwards when it executes it.
for example, this works:
<?php
// call foo before we define it
foo();
// unconditionally define foo()
function foo() {
echo 'i am foo';
}
?>
but this will not work, because of the conditional definition, even if the cond is always true
<?php
$bar = true;
foo();
if ($bar) {
function foo() {
echo 'i am foo';
}
}
?>
you can see that php compiles the entire script before trying to interpret it. in the first case, php knew the definition of foo() before it interpreted the script, and so when it came to interpret the call to foo(), it had no problem, and it worked. but in the second case, php had not yet evaluated/interpreted any conditionals, so the call to foo() resulted in a fatal error because it interpreted the call to foo before it got to the function definition.
i havent tested it, but i would also imagine when using conditonal includes and evals, that they are not compiled into binary code until the parser has already reached the interpretation stage and realized it must do that. afterall, it might not even be possible to know the name of the file to include until interpretation time.
although i havent looked at how the different php accelerators work, i would imagine they can only cache part of the script(maybe just the part that php initially compliles into binary before interpretation). if thats the case, then there could be significant differences in performance when dealing w/ conditional includes and the like. having them conditional would prob be a good idea if the code to be included is rarely used, but if commonly used, a cond include might not be able to be cached by the accelerator. again, im just guessing here.
just wanted to give you a tiny bit of insight into how php works. hope you find it helpfull in some way.