Facebook reworks PHP for speedier servers

By on
Facebook reworks PHP for speedier servers

HipHop platform released as open source code.

Facebook has built a new Hypertext Preprocessor (PHP) platform dubbed HipHop, which it claims will dramatically increase the speed and scalability of its systems.

Senior Facebook engineer Haiping Zhao said in a blog post that the company had been developing HipHop for two years, and had halved the processor load of running web pages.

"HipHop allows us to keep the best aspects of PHP while taking advantage of the performance benefits of C++," he said.

"We have written over 300,000 lines of code and [performed] more than 5,000 unit tests. All of this will be released this evening on GitHub under the open source PHP licence."

HipHop translates PHP source code into C++ and uses G++ to compile it. As C++ is much faster and more efficient at handling code, the whole system has a much lower overhead.

Facebook has also developed an interpreter called HPHPi which frees PHP developers from compiling code before running it. Zhao said that this had helped Facebook engineers find bugs, and to keep writing code in their usual style.

The company is now running more than 90 per cent of its production server operations using HipHop, and is hoping that the system gains other high-profile users.

Facebook has produced a video about HipHop for PHP.

Got a news tip for our journalists? Share it with us anonymously here.
Copyright ©v3.co.uk

Most Read Articles

You must be a registered member of iTnews to post a comment.
| Register

Log In

Username / Email:
  |  Forgot your password?