Tangential Topic: MacPorts PHP code broken by OS X update?
ryandesign at macports.org
Tue Aug 17 20:29:28 PDT 2010
On Aug 17, 2010, at 22:19, John Korchok wrote:
> I had already used require_once exclusively when I
> built the code, knowing that this could be a problem. That's why I was
> baffled that a security update could trip such an error message. However,
> the if(!class_exists'ClassName') construct solves it, so I'll give up
> wondering why...
Are you using any kind of PHP optimizer -- APC, eAccelerator, etc.? I used to use require_once too, but then I read that require_once (and include_once) were slow and not recommended. Not sure where I read that first, but this page has some analysis:
Regardless whether there is a performance concern, if you are using an optimizer, perhaps that optimizer doesn't enforce the "once" restriction; try without the optimizer if you're interested in tracking it down.
More information about the macports-users