Is PHP really a toy?
By
On further discussion we found out why PHP felt like a toy to him and others.
Some reasons are the following -
- The language is too easy to learn
- It gets things done so easily that the developer cannot take the pride of creation
- Cannot code things from ground up
- Cannot do much rapid application development like that in Java SEAM
- Hard to debug
I’ll address these comments one by one and add some of my own views too.
1. The language is too easy to learn
I always thought this was a good thing. If a language is easy to learn you can get your developers going much faster and be more productive. They will spend more time producing quality software than fighting with the implementation language.
2. It gets things done so easily that the developer cannot take the pride of ownership
I agree this is a nuisance. As an engineer I too want to take pride from designing phenomenal software that solves a real world problem. However, if a programming language is easy to use, once again you can spend more time focusing on the problem at hand than the implementation language. If PHP gets things done easily, then go ahead use the power of this language and solve more complicated problems! That will definitely give you the pride of ownership when you see your software being used by thousands of people.
3. Cannot code things from ground up, like that in C/C++
This is a bit tricky indeed. C/C++ is a very low level language. Nowadays C++ is really used for mission critical real time systems, operating system development, desktop software and the like. PHP is a scripting language that was designed to solve the “web problem”. PHP was solely designed keeping the Web in mind, hence the powerful string manipulation and HTTP libraries. So it boils down to using the right tool for the right job. If PHP codes websites better go with it .. if not try something else. I have coded in Python, Java EE, Erlang, C++ and so far haven’t found a good reason to not choose PHP for a web project.
4. Cannot do much rapid application development in PHP .. like that in Java SEAM
Now this is true! PHP is a language and we are comparing the language PHP with a Java framework SEAM. This won’t give us the complete picture. We need to compare PHP with Java and then a PHP framework with a Java framework. So the comparison is really between the PHP frameworks – CodeIgniter, Symfony,CakePHP and the Java frameworks – SEAM, Spring, Struts, JSF. So far I have not seen a Java framework (talking about SEAM and JSF) do something better than that in a PHP framework (CodeIgniter, Smarty and Symfony). Yes there is better IDE support for Java than there is for PHP, but frameworkwise it’s hard to convince me that a PHP technology is lagging behind in any way than the others. We can do rapid application development in PHP too .. just need to use the right PHP framework.
5. Hard to debug
Ok this I do not have an answer to because we still use var_dump($my_var) to debug our php applications or write something to the logs to step through the execution of a script. Yes this is one area I may agree that PHP is lacking. The IDE of of choice for us is Eclipse and if we can’t hook up a PHP debugger with Eclipse it’s not good! I know there is the Zend debugger for PHP and the Eclipse PDT. But we have not tried these yet. May be I’ll cover this in a blog post of it’s own.
I’ll be interested to know what other people think of PHP.


Good points!!
You’re right, apples should be compared to apples, not oranges.
In this age of web 2.0, we need to be a aware of how rich the framework is and how much effort/coding is needed to deploy a customized solution. At some point I’d like to see a comparison of these for the frameworks/languages you mentioned.
For rapid solution developers, I’d think IDE support is absolutely critical. It could lead to a make or break as far as picking a language of choice is concerned. A framework can’t be complete without a mature IDE to back it up. Not sure where the PHP frameworks you mentioned stand in this regard. I’m sure you’ve seen SEAM framework in action
Hopefully PHP will overcome their shortcomings very soon. Good luck to them!!
Good to see yet another “Is PHP Serious Enough” post. I don’t know why but most big corporations don’t take PHP as seriously as they should take. One big reason I think is the inertia of their technology adaption. Facebook would be a perfect example of how scalable and big framework PHP can provide.
Tanjir,
That’s right. There’s also the scenario that big corporations have desktop based java applications already written, which they’d like to move to the web now. A Java Application Server makes it easy for them to transform the app to a servlet and make it available to users easily.
Farhad
Is php really toy?
As a PHP Developer everyday i face that kind of stupid question. That’s why i share this Article in Facebook.
Hi Atiqul, thank you for sharing this article on Facebook. Could you please send us the link so we could contribute to your Facebook discussion?