5 Reasons I Love PHP5

PHP. What more can I say, the script language on the web that I originally thought was, well, just ASP with a different syntax, designed for people who just wanted to complicate life by adding semi colons and curly braces to their language, you know, to show off because they can code in something like C.
Anycase, with the release of .NET I, as a faithfull Microsoft coder, immediately got a copy and started playing with it. I thought .NET was the solution to anything that could happen on the net, you had proper object support, no more writing ActiveX DLL's in Visual Basic 6 and then using them on a webserver where it might or might not work as you want it to, all was native and all was well, until the day I needed to scale. The user base of some of my systems jumped from 30 to 500 users virtually over night. .NET died. So did my love for Microsoft.
That was 3 years ago. I have since been converted to a FireFox user, running Linux at home, only working on Apache webservers and coding in PHP. It is my scripting language of choice for a large number of reasons. I am not going to go into commandline scripts, as I am still trying to make up my mind about a few others (Perl, Python and Shell Scripting) but on the web, I am sold. Projects large and small can be done with PHP, it scales, it is lightning fast, has pretty syntax can be optimized and compressed like hell, and has database and platform support .NET can only dream about.
Getting back to the topic at hand, 5 things I love about PHP.
1. SimpleXML
If you have ever parsed XML in any language, you will appreciate that it can be a huge pain to get through, it can be slow, and it certainly does not lack complexity, yeah, you get used to the pain and it becomes easier, but that is only for those poor souls that never tried SimpleXML.
One Quote I found online goes something like "XML is the solution to all your problems. SimpleXML ensures that it is not the root of all your problems"
For more info visit http://php.net/simplexml
2. CURL
Ever had a need to get some URL directly from a server? Compose a post in the background and get the result? Perform Server2Server XML operations? Look no further, CURL has it all, It is so dead simple to work with I cannot even start to comment as writing the comments alone will take longer than it will to implement a complete Server2Server XML based solution with the combination of CURL and SimpleXML.
More here http://www.php.net/manual/en/ref.curl.php
3. SQLite
Yeah, I know, who needs a small, lightweight, single filebased, cross platform database with a Native API when you have access? Anyone that might accidentally get a database of about 2 terrabytes, that's who. Yeah, it lacks a few things, but check it out, when you are working with the smaller masses (just about every site that will not become the next ebay or yahoo) this is for you, check it out here http://sqlite.org/
4. GD
Working with graphics, we don't really need that on the net do we? Not unless we are trying to get a few Graphs displayed and perhaps do some type of CAPTCHA implementation to prevent comment spam. All you .NET junkies out there, read it and weap when you see how easy and fast GD is as opposed to your System.Drawing collections. Oh, you can actually do a complete image gallery using GD to create thumbnails and resize pictures for viewing in less than 200 lines of code (That is PHP and HTML combined, oh, I forgot, .NET coders do not concern themselves with HTML, who needs a site that is standards compliant in anycase)
http://www.php.net/manual/en/function.imagegd.php
5. The command line interface
Using PHP scripts to automate just about anything, and boy is it fast and small, I have yet to see .NET produce a complete application that actually does anything like interfacing with both an FTP and Database server that is under 100kb.
To conclude, if you have not yet tried out PHP, give it a shot, have an open mind and get creative, remember PHP does not force you to do everything one way as .NET does, it allows you to get seriously creative, and that is what you have to do to get the job done, ultimately, after 6 months of PHP'ing, if you want to go back to Bill, go for it, I promise you will be a better programmer for it.


1 Comments:
Howzit l09f1l3!
A coupla things: firstly. whether you think me stupid for asking I will ask anyway. What's behind the name "l09f1l3"? Do you have to be programmer to get it? Please enlighten me.
Secondly, a bit of background on me. I am an IT conultant who does internal IT for a company. So I get to maintain and implement networks and servers and such. Part of my job though, is to create and maintain a couple of MS Access databases. I went on the 3 level courses adn decided that I wanted to do more with the db's, so I went on VB for Access. It was great! I found it very liberating to not be constrained to just what Access gave me. I am telling you just so that you'll get a picture of my experience. I want to know how difficult is i to get to know PHP, as I have come accross many web apps that were in PHP, which in the past made me pass them by. Maybe I should relook? What are your thoughts?
Cheers,
SteelJaw
http://steeljaw.blogspot.com
Post a Comment
<< Home