Today is a good day to code

As I suspected PHP is the same speed as ColdFusion MX

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

As I suspected PHP is the same speed as ColdFusion MX

Picture of Irv Owens Web DeveloperWell, I'm done. I have re-built my site in PHP to see if there is any real difference in performance between PHP and ColdFusion MX / J2EE. What I have found is that on the same platform, as close as one can get it, PHP is the same speed as CF. What this means to me as a developer is that given the added complexity of coding in PHP, and the difficulty in separating presentation code from business logic, I'll keep choosing JSP / ColdFusion over PHP when given an opportunity.

I do not think that PHP is bad, weak, etc… It is a great tool, and the price is definately right, however I can do things much faster in ColdFusion, and I'd suspect that most programmers would choose the true rapid development language over one that was more difficult. That said, PHP has some nifty plugins that make it fun, and my test is hardly scientific. I know for example that this particular hosting company uses IIS and not Apache or the LAMP stack. This probably adds to some of the slowness of PHP on the platform. However, any slowdowns that plague PHP would plague JSP / ColdFusion as well since they both seem to run better on Linux.

I am releasing the query recordsets, and trying my best to limit superfluous code in PHP the same way that I would with ColdFusion, and I consolidated my functions into one file similar to the CFC that I use on my CF site. So, while I would have liked to use Fusebox 4, to make the test even close to interesting, I had to keep them the same and it looks like it makes no difference whatsoever where performance is concerned. But enough about my rambling on, its 1:30 AM and I am tired, take a look for yourself.

PHP version of Owens Performance

Oh, PPS. Some of the functionality I am too tired to duplicate right now such as the number of records returned in the blog search, and the time taken by the query. These are really easy to implement in ColdFusion, and not too difficult in PHP, but I thought that this was enough for now.