Ok, so here is the thing, while autoloading might be cool and fun it
doesn't work with OpCaches...

Let me rephrase that, Your code will work but you will not see the
full use of the opcache, this has been discussed in detail on the pear
mailing lists and a couple other places.

Basically when you load any file using a variable as the target an
opcache can not cache that file fully because it has no idea or not if
the next request is going to be the same file.

If you want to take full advantage of opcaches from my understanding
of the discussion you have to do

require('pathtofile'); OR require(CONSTANT_BASE_PATH.'restofpath');

If any non constant value is used an opcache will not cache fully, If
your "constant" can change each page load you might run into errors.


Now granted this is just what I gather from the stuff I have read over
the last 2 months, I trying to put together a good benchmark to see
whats the story is IRL.

Reply via email to