[display_podcast]

OK, this was supposed to be my first blog post, but then I wrote that bit about web 2.0 security. I almost dropped this post but I’m having so much fun engaging in flame wars with my co-workers I had to finish this one. Hopefully someone will take up the PHP banner and we can duke it out.

That said, here is my almost first post only slightly modified for completion of thought….

I’ve always thought blogging was for lonely people who spend too much time at their computer. But since becoming a Rails junkie I find that reading the blogs of Rails core members is a great way to keep up with new Rails techniques. Which leads me to the titled purpose of my first ever blog.

The Day PHP Died. For me that is, well you could alternatively title it “The Day I Discovered Rails” or maybe “The Day I watched that DHH video where he makes the blog-site in under 10 minutes”…. well, those don’t seem as catchy and hyperbole always generates more interest.

Now I won’t get into my near zealot belief in Rails, that’s for another post. The focus here is why PHP, as a language is a “has been” technology. It definitely had a good run, gajillions of lines of code have been written in PHP and thousands of web sites/apps are written in PHP. I myself was a PHP developer for years. In fact, it was my PHP knowledge that got me hired here to PC-Doctor.
They can aggravate hemorrhoids and even cialis prices cause some infections. If it works for them, imagine how well it will take your prospects through a learning process cheapest viagra from india in sequential order. That is why men prefer to buy buy cialis pharmacy robertrobb.com Kamagra online, a tablet associated with breaking down of enzymes (turn off), thereby making the effect long period. tadalafil cialis Make sure you take the medicine an hour before you intend getting intimate with your partner, by swallowing it whole with water.
However, scripting languages, like all technology, evolve and PHP is now face to face with Darwinian reality. Why do I forecast the slow inevitable decline of PHP?

In a word, consistency. PHP has got to be about the most inconsistent language I’ve used. The fundamental issue is that a language like Ruby is very true to the OOP paradigm. PHP is not. This means that in Ruby if you wanted the length of say a string you would do string.length. You have a similar named operation in Ruby for an array, like array.length. Therein lies a great strength of Ruby. Any object, for which a length makes sense, will simply implement the length method. Now, how does PHP handle this? If you want the length of a string you do strlen(string), if you have an array it’s count(array). You see the problem? The real problem? Since the strlen and count functions are not connected to any object they must have distinct names to co-exist. Thus, PHP core is filled with a gajillion functions, some named so you know what they might do “array_keys()“, others not so much “each()“. This makes PHP code much more difficult to write and read. I spend far more time visiting the PHP manual web page than I do for Ruby. Often when I’m at the PHP manual it’s because I can’t remember the precise name of some function, or the order of it’s parameters.

Another feature sorely deficient in PHP is a solid interactive console. There is some kind of console in PHP but I tried my best to make effective use of it and it just didn’t work out. Contrast that with Ruby/Python where one can simple type on the cmd line [“irb”,”python”] and that’s it, a nice interactive console shell opens and you can quickly work out an idea or test some curiosity.

A third feature where PHP leaves me wanting is in code organization. Ruby/Python are fundamentally OO languages. Thus everything is a object, and every bit of code you write is contained in an object or module. This makes building large applications much easier to organize and maintain since all your code has it’s own place and namespace. PHP offers classes, but they’re optional and you can include files but there are no namespaces.

Finally, there is one thing that PHP has where it outpaces Ruby and Python. The PHP documentation manual is world class. I find looking up a PHP function very easy to do either by scanning a list of function library or using the search feature. Of course, if you’re using PHP your going to need that documentation every time you set to work.