Even if use
spl_register_autoload( function( $class )
{
$file = '/path/to/lib/' . $class;
require_once( $file );
return class_exists( $class, false );
} );
xdebug shows that total self cost for this closure (19%) is a little less than its inclusive cost (25%). And it’s 10 times higher then PDO’s execute() (2%).
Why does it takes so much time?
Seems xdebug takes included file’s code as closure’s code. That’s why are such results.
I’ve found it out when modified included files.
As I ‘m using APC, execution time has been increased. It has affected closure’s self cost.