开发者

Do compiled PHP scripts exist?

I am wondering if anyone has used or read about PHP scripts compiled as a .so extension for Apache... Thing is I think I remember reading about it somewhere but dont know if such a开发者_如何学编程 thing exists.

This looks promising, but incomplete and abandoned: http://phpcompiler.org/

Im interested because i think it could improve performance... Perhaps someone could point out a framework or apache extension that does this.

Thanks!!


They do exist. There's HipHop Compiler for PHP by Facebook.
I don't know if it works with Apache, though.
You may want to take a look: http://developers.facebook.com/blog/post/358
Github repository: http://github.com/facebook/hiphop-php


If you want to improve the performance of your PHP scripts in this way, you should try something like Zend Accelerator. It keeps the bytecode around so it doesn't have to be recompiled on every request.


Im interested because i think it could improve performance

This is a very loaded question. Yes, if you are handling more than a million hits per hour, then there are very real benefits in compiling PHP (see other answers about HipHop). But if you really meant to ask "how do I improve the performance of my website" then that's probably the last answer anyone should give you.

If you're objective is to make your site go faster, then you first need to establish methods of capturing the time it takes to service a request (preferably seperating network and database time from webserver time), and for capturing page turn times (i.e. the time it takes to load all the content on a page) then look at stuff like:

  • browser side caching
  • server side caching
  • opcode caching
  • query optimization
  • HTTP compression
  • OS and network tuning

etc.

C.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜