Hello all, long time no see.
When I am inside the body of an autoloader function, am I allowed
to assume the invariant that the class passed to the autoloader function
does not exist? Last time I checked, PHP was still single-threaded,
so this invariant being broken would be quite suprising to me, but
a user reports that they are seeing precisely this behavior from a
combination of Zend Debugger + APC.
Cheers,
Edward
Hi!
When I am inside the body of an autoloader function, am I allowed
to assume the invariant that the class passed to the autoloader function
does not exist? Last time I checked, PHP was still single-threaded,
Generally, yes, though nothing prevents somebody from calling the same
function explicitly regardless of some class existence - the engine
however wouldn't do so if the class exists.
so this invariant being broken would be quite suprising to me, but
a user reports that they are seeing precisely this behavior from a
combination of Zend Debugger + APC.
I'm not sure that APC and Zend Debugger are fully compatible, but if you
seeing this it is probably some side effect of one of these two modules.
IIRC Zend Debugger does nothing that concerns autoloader, so I'd look at
APC first.
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227