PHPEmbed

The PHP programming language has solidified itself as the language of choice for many top Net properties, including Facebook. PHP is easy to use and integrates well with Apache, Memcache, and MySQL. Despite its suitability for web development and scripting, PHP is generally not the best choice for standalone software or servers. C++, on the other hand, is well suited for building both online and offline services.

Unfortunately, whether the new services operates with details managed by the existing PHP cipher base it can be dangerous to use a separate info access pattern. whether the cache keys or database schema were to change in the PHP cipher base soon after the service would be broken (and potentially corrupting info for the PHP cipher base) until the cipher was updated and the program recompiled and restarted.

Faced with that problem we decided to embed the PHP Interpreter into C++ binaries. that isn’t a novel endeavor by any means; Apache uses the PHP Server API (SAPI) to achieve precisely that. However, when we began attempting integration of our own we found that the SAPI due quite a bit of expertise to manipulate effectively.

In order to assemble embedding PHP truly simple for all of our developers we developed the PHPEmbed library which is just a more accessible and simplified API built on top of the PHP SAPI. The library is so useful, we decided to share it with the world. Check it out for yourself at http://developers.facebook.com/phpembed/

Boz is a software engineer at Facebook and, like PHPEmbed, he is open source

Orginal post by Andrew 'Boz' Bosworth

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
Related Articles
  • No related posts
  • No comments yet. Be the first.

    Leave a reply