NYCPHP Meetup

NYPHP.org

[nycphp-talk] Facebook's LAMP Stack

Hans Zaunere lists at zaunere.com
Thu Apr 23 13:12:03 EDT 2009


> > What I'd really like is a way to "statically link" a PHP application.  While
> > this is somewhat possible today, PHP's dynamic nature makes this difficult
> > to fully realize.  For example, it can be cumbersome on the developer to
> > check in multiple places if APC is available, what files are cached, what
> > should be included, etc.
> 
> You could take a page out of the javascript book and write a
> pre-compiler that creates one big script using concatenation.

True - but then don't you get into a bootstrapping problem?  I suppose it could be managed to the point that you're only really reading one script off the disk (something that is auto_prepend, perhaps).  You would need some type of deployment script too I'd imagine.

It just seems that once APC has cached something in RAM, there should be a more straightforward way to know that, and thus get usage of it, rather than doing a standard include/require call.  But I do realize that the dynamic of PHP makes this difficult.

H





More information about the talk mailing list