Archive for the ‘HipHop for PHP’ Category

How to compile PHP scripts?

Wednesday, July 6th, 2011

In an earlier article I described how to install HipHop for PHP translator that allows compilation of the PHP scripts.

This time, I will describe different types of compilations, so that it is possible to build both simple scripts and large systems written in PHP. (more…)

Drupal HH7 project: HipHop for PHP and Drupal 7.4 compatibility patch

Thursday, June 30th, 2011

Another month, another Drupal 7 version. Drupal 7.4 was released some days ago so it’s my turn to announce the next version of Drupal 7.x patch adding support for HipHop for PHP source code transformer.

Drupal HH7 Version: 1.2
Release date: 30-06-2011
Compatible with: Drupal 7.4
Not compatible with: HipHop branches 36a16fb and 6044908 and Drupal 7.0-7.2
Tested on HipHop branch: 806ee06 and earlier

Modules compatibility list can be found at the end of this article. Please report any patch issues in the comments to this annoucement. (more…)

Download VMware image of Fedora 14 Linux with HipHop for PHP installed

Friday, June 10th, 2011

Many articles on this blog describes the performance and functionality of HipHop. Since many readers like the dry facts, I decided that I prepare an image of Linux distribution, which will have a built-in support to PHP code translator. (more…)

Drupal HH7 project: HipHop for PHP and Drupal 7.2 compatibility patch

Tuesday, May 31st, 2011

Drupal 7.2 was released about five days ago. Today, I’m proud to announce the next version of Drupal 7.x patch adding support for HipHop for PHP source code transformer.

Drupal HH7 Version: 1.1
Release date: 30-05-2011
Compatible with: Drupal 7.2
Not compatible with: HipHop branches 36a16fb and 6044908 and Drupal 7.0-7.1
Tested on HipHop branch: 806ee06 and earlier

Modules compatibility list can be found at the end of this article. Please report any patch issues in the comments to this annoucement. (more…)

Drupal 7: Download HipHop for PHP’s compatible source codes!

Thursday, May 19th, 2011

As promised in a previous article I give you source codes of Drupal 7 which are compatible with HipHop for PHP source code transformer.

This version of the patch has been successfully tested on a minimum base installation of Drupal 7.0. At the moment I can not guarantee the correct operation of other versions of Drupal. Subsequent patches will add support for additional modules should they prove to be defective during the futher test process.

There is also a new version of patch which is compatible with Drupal 7.2, read this article for futher info.

Please report any patch issues in the comments to this story. (more…)

Drupal 7: HipHop for PHP vs APC – benchmark

Tuesday, May 17th, 2011

Drupal is one of two most popular content management systems (CMS) written in PHP . It is used as a back-end system for at least 1.5% of all websites worldwide. It is also one with the the slowest systems of this kind on the Internet

There have been many suggestions on improving Drupal performance, some of them recommend the use of APC module, data caching, or even compilation of the entire system through HipHop for PHP. While the first two solutions have been successfully implemented, no one was able to perform the build process.

After many battles with the compiler and the Drupal code, I present you results of the first successful translation of Drupal 7 to C++ language. (more…)

HipHop for PHP: Unimplemented functions and features

Tuesday, May 10th, 2011

Because of various incompatibilities and installation difficulties HipHop for PHP is not the right solution for everyone deploying PHP.

In this article I present you the documentation about unimplemented functions in HipHop for PHP compiler. This is an enhanced copy of the github’s documentation which has been deleted from project’s website three days ago by unknown reason.

The article has been enhanced with my own notes to make it up-to-date and more friendly for the end-users. (more…)

How to speed up the compilation of PHP code in HipHop for PHP – part I: ccache

Tuesday, May 10th, 2011

Compilation of any program written in PHP, depending on its size, can take anywhere from few to tens of minutes.

The long compile time is nothing unusual for C, C++ and Java developers. Unfortunately the same can not be said for PHP programmers who are accustomed to the fact that all changes in the source code are seen online in their browsers.

In this article I’ll present you one of the solutions that significantly reduces the compile time of PHP code. (more…)

Drupal 7 and HipHop for PHP: compilation

Monday, May 9th, 2011

Shortly after the release of HipHop for PHP, many articles about its possibilities and functions it can offer to existing PHP scripts appeared on the internet, but the most of them described problems which disrupted the compilation process of two popular CMS systems: Drupal and Joomla. They were caused by the poor quality of the PHP code in which these systems were written.

These articles are outdated since the release of new versions: Drupal 7 and Joomla 1.6.

Has the quality of PHP code improved? Is it now possible to compile the Drupal system without any problems?
This series of articles will answer these questions.
(more…)

Mod_rewrite and HipHop for PHP on Apache Web Server

Monday, April 25th, 2011

PHP scripts compiled with HipHop for PHP compiler can easily act as HTTP servers. However, they do not provide the Internet’s most popular method for creating friendly URLs’, the mod_rewrite module that is supplied with the Apache Web server.

In this article I will describe the easiest way to run compiled PHP scripts from the Apache server. (more…)

How to install HipHop for PHP on CentOS 5.x

Friday, April 22nd, 2011

In one of my previous articles I described the installation process of HipHop for PHP compiler on Fedora system.

I’ve also mentioned that CentOS 5.5 had problems with this compiler.

In this article I’m going to show you how to overcome these difficulties and succesfully install HipHop for PHP on this system. (more…)

HipHop for PHP: Benchmark – Revenge of PHP

Monday, April 4th, 2011

In previous article I measured the performance of HipHop for PHP by performing some tests downloaded from the shootout.alioth.debian.org website. Unfortunately the test list was incomplete.

Only six tests were selected to avoid potential incompatibility issues with the HipHop compiler (those incompatibilities can be found in the compilers’ documentation). Three other PHP scripts had problems reading from the STDIN (tests: the reverse-complement, regex-base, k-nucleotide), while the fourth one failed because of lack of support for the gmp library (pidigits test).

As requested by readers however, I present you the results of two consecutive tests: regex-dna and k-nucleotide.
(more…)

HipHop for PHP: Benchmark

Saturday, April 2nd, 2011

Benchmark icon

There is a well known benchmark on the shootout.alioth.debian.org website comparing the performance of many different programming languages. While I am far from discussing the superiority of one language over another, I realized that it would be interesting to perform a little speed test between a … PHP and PHP (compiled with the help of HipHop for PHP).

I hope that test results presented below will be helpful in answering, how much faster is PHP after compilation, and whether the HipHop for PHP is actually as efficient as claimed by Facebook developers. (more…)