More Virtual Promote ... Search Engine Forums · Webmasters Toolkit · Free Website Templates · Scumware.com
.
Virtual Promote Gazette Home Subscribe/Unsubscribe Archives  
.

gazette



Issue # 210 (03-17-2004)

Get Over it ?

Coders Corner
PHP 5 ... worth the wait, or a disaster in the making ... Part 1 The jury is still out on this one. It's definitely (and obviously) still in BETA mode, but the folks at PHP are pretty confident that it's getting close to becoming stable enough for an official and final release. I generally try and stay away from full-on version upgrades of programming languages until they've had the chance to mature, but in this case, I thought it would be fun to chronicle the release through interested eyes. It reminds me a lot about 1996 or so, when Perl moved from version 4 into version 5, introducing objects, and a much beefier engine. Perl 5 was bigger, slower, yet infinitely more powerful than the previous versions. It was a good and much needed upgrade to the language at the time, but it was wrought with problems. Notably, most of the code written for Perl 4 was simply not compatible with the newer Perl 5. CGI's all over the Internet were breaking, bringing down entire Web sites (Amazon, for one) when IT staffs across the globe upgraded -- A prime example of piss-poor planning and severe lapses in communication between development staffs and IT departments in thousands of companies. I wonder if PHP's new version will cause the same headaches when "the switch" happens?

So, your faithful correspondent downloaded the latest PHP 5 beta release for a test installation on my development server. As I had previously compiled PHP 4 into Apache from source code, I knew that I had all of the prerequisites on the machine, so I didn't foresee any troubles getting it installed. About 4 commands and 20 minutes later, I was done. Quite literally, it was an "unzip," a "configure," a "make," and a "make install." I had to edit my Apache's "httpd.conf" file to comment out the "LoadModule" line for "php4," and then restarted Apache. So far, so good... now to try out some applications.

As expected, there were a few hurdles to cross. All of the applications that I write (well most of them) are done in OOP (Object Oriented) constructs, so I am probably a bit more ahead of the game than most. PHP 5 found a few errors in my code that PHP4 had previously ignored (some double variable declarations), but after about 10 minutes of editing, I had Hyperseek and Jackhammer, all 40 modules, 100,000 lines of code, fired up and running without a hiccup. I also, for grins, tried out vBulletin, IPB, and about 15 other free and commercial PHP applications that I had downloaded over the last few months. By and large, there were no major compatibility problems, most programs worked without modification, or, as was with the case with Hyperseek, just a few minor edits here and there that PHP 5 required, but that once done worked in both PHP 4 and 5, so ... assuming that the developers out there take their medicine and make a few changes, users that upgrade to PHP 5 (or are upgraded automatically by their ISPs into it) shouldn't experience any major problems as we did back in the days when perl made the big move. Based on my initial tests, a big "Thumbs Up" to the PHP folks for making the transition between 4 & 5 pretty seemless.

So, aside from some of the new features that PHP 5 introduces (such as improved XML handling, SOAP, Integrated SQLite database, etc), how does it perform? Given that it's still in BETA, it's tough to know for sure, as I'm sure they've got lots of extra code in there, internal debugging, etc that won't be in the final version. Just for fun, though, I ran it through my load balancer, and you'll see in the chart below, that PHP 5 is about 50% slower than PHP 4 and about 200% slower than PHP 4 with an accelerator. The results below are for a search in Hyperseek that returns 12 results from a mySQL database ... a known data set, on a known set of hardware (my development server, which is a Single P500, with 512 MG RAM). Take these results with a grain of salt. Typically, beta versions are much more bloated than the final releases.
Accelerated PHP 4
Transactions:           30
Elapsed time:           3.764 sec
Bytes Transferred:      212820 bytes
Response Time:          0.34 sec
Transaction Rate:       7.97 trans/sec
Throughput:             56541.08 bytes/sec
Concurrency:            2.7
Status Code 200:        30
 

Standard PHP 4
Transactions:           30
Elapsed time:           6.620 sec
Bytes Transferred:      212820 bytes
Response Time:          0.58 sec
Transaction Rate:       4.53 trans/sec
Throughput:             32150.41 bytes/sec
Concurrency:            2.6
Status Code 200:        30
 

Standard PHP 5
Transactions:           30
Elapsed time:           10.660 sec
Bytes Transferred:      212820 bytes
Response Time:          0.87 sec
Transaction Rate:       2.81 trans/sec
Throughput:             19964.26 bytes/sec
Concurrency:            2.5
Status Code 200:        30

In the next gazette, I'll be examining the XML/Soap architecture in the new PHP. Part 3 of this series will likely focus on the new SQL Database engine that's a built-in part of PHP 5. Stay Tuned...


Read the Coders Corner section from the Last Issue or in the Following Issue


JimWorld Member comments and feedback ...

Add your own comment ....

We accept comments to Gazette Articles only by registered JimWorld.com members. If you are not yet a member, please join now. Membership is free, and entitles you to not only post comments here, but also to participate in our discussion forums, as well as other areas of the JimWorld.com network.

If you are currently a JimWorld member, your userid and password will allow you to login with the form below.

Login
Forget your password?
Password

 

 

Sponsored Links

Search for a Free Domain
The Virtual Promote Toolkit is hosted by the experts at SimpleNet. You should be, too! Whether building a new site or transferring one, there is no other hosting platform comparable to SimpleNet’s; hosting for less than $5/month.
Search for the following tlds: .com, .net, .org, .info, .biz, & .us
Already have a domain or site? Move it to SimpleNet


Hyperseek Search Engine
Member Spotlight
Automate Link Exchange
Automate Links mgt software Download now, Why Pay monthly? (linkautomate)
spacer

 

 

   

© 1995 - 2004  ·  iWeb, Inc DBA JimWorld Productions