Tuesday, 31st May 2005

PHP4 vs PHP5

Today is the second post and it is getting extremely frustrating to deal with the different versions of PHP4 and PHP5.The problem stems from the fact that my website is being hosted by a webhosting company in India which runs PHP 4.3.x on their Linux server.

Not that this is a bad thing. But with the much improved version of PHP, PHP5 offering so much in terms of XML processing etc and DOM API, i find it hard to resist the use of this new and powerful functions that PHP5 has to offer.

With my website focussing on data portability and avoiding databases (Databases are a wonderful thing, but if only they were platform independent, yeah yeah i know we have mySQL etc .. but you still have many tasks to perform like database setup etc ... nothing of this sort with XML.

Well the data portability achieved by XML is an old story and i have digressed !!!). My aim for my site is to keep it platform independent. And how i achieve it is by using an open source language such as PHP (which is supported on multiple platforms) and keeping all my data in XML format.

Easy you say, well platform independence is achieved easily enough, but freeing myself from versioning trouble was not what i had expected.

You might say that i should have used SAX or something like that for my XML processing, but laziness and inappropriateness kept me from it. My XML files are very small and can be easily handled with DOM. If you doubt the power of the PHP5 DOM API, try it for yourself and decide.

So now i am stuck with either writing code for PHP4 to meet the server requirement. Ideally the web hosting company could upgrade to PHP5 but that could mean that existing sites they host might break since PHP5 is not entirely backwards compatible with PHP4. So faced with this dilemna i opted to stick to PHP5 and find myself a web host.

I would have found one anyways since the package i have currenly sucks big time.(just 20 MB). And with just a month and little more left for the expiry, i think its about time to move on to something better (and bigger).

Posted by Nikhil on Tuesday, 31st May 2005 in TechnoBabble

Post a comment