Categorized | News

PHP OO issues

Posted on 09 October 2001 by Demian Turner

reported from a PHP user: PHP (interpreted code) is much slower than compiled code (COM). Especially when all of my PHP code is OO. The Object-Oriented version of the PHP code is about 3 times slower than the shorter procedural version. I can write a simple PHP script and achieve 8000+ hits, but change it to Object-Oriented code and it achieves 1000-2000 hits. By porting a PHP library to a COM object I improved performance (of the OO-PHP code) from under 1800 hits at 8 threads to over 3800 to 8600 hits at 8 threads stress level.

Bookmark and Share

1 Comments For This Post

  1. Anonymous Says:

    Wow, that\’s very useful information indeed. I am working on a commercial PHP application that uses classes extensively as you show in your article. It is much slower than my normal procedural code and I noticed this straight away. Interesting ..

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up