In a talkback by Charlotte Moller about an article written by Stephen Shankland at C|NET news and titled Andreessen: PHP succeeding where Java isn’t, I was stopped at a cost point of choosing PHP. Charlotte talked about her professional experience of developer and how the Price matter with PHP

I’m surprised nobody has brought up the cost aspect when comparing PHP and Java. I have worked for several small companies deliveriving Web application services type applications and PHP has been the clear winner for these companies in keeping their costs low.

Sure, you can start with Java for very little cost but when you start to grow the service and end up getting into databases, applications servers, and the like some pretty hefty licensing fees come into play. Setting up a LAMP (Linux, Apache, MySQL, PHP) server on the other hand is wonderfully free! All you need is the hardware and even there there are tons of hosting and dedicated server companies that can provide you the platform for small change compared to the cost of an Oracle license! As for .NET, with Microsoft nickle and diming you at every turn, she don’t even want to go there!

As a programmer, She love programming in Java. But PHP fits the budget of the companies She worked for far better. Her only real problem with PHP is that She do find, as mentioned before, with PHP so easy to learn there is a lot of crap code. However, a disciplined programmer can make beautiful code in PHP too, if you know what you’re doing, especially using OO in PHP5. It makes for a real headache when I hire subcontractors, weeding out the qualified programmers from the taught-my-self PHP web hacker.

The only time she yearn for Java these days is when she’s forced to write explicit unit tests (PHP has PHPUnit, just like JUnit!) to test error conditions because there is no compiler to pick-up on my typo errors! Argh. Other than that, she love the way PHP can be used to implement application services over the web for so darn cheap! Practically solutions after all win out over design elegance in my world.

I prefered to keep charlotte words as she write them, because I liked to hear opinion about PHP from Java developers who have migrated to PHP. I have a friend, Java programer also, who contacted me few weeks ago to ask me about some technical stuff in PHP because he started working on PHP too. I was very busy in that time but I’m sure that when we met we’ll talk about Java and PHP.

But PHP make really the difference in web application development when we talk about application cost. PHP make productivity really high compared to other programming langages. And of course the less time you spend to develop your application the less money you spend on it.