Re: Autoloader invariant

From: Date: Fri, 31 Dec 2010 00:37:30 +0000
Subject: Re: Autoloader invariant
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-51143@lists.php.net to get a copy of this message
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

« previous php.internals (#51143) next »