Yesterday while i was surfing the stackoverflow.com , i found a question which is :
Defend PHP convince me it isn’t horrible?

I made a tongue-in-cheek comment in another question thread calling PHP a terrible language and it got down-voted like crazy. Apparently there are lots of people here who love PHP.

So I’m genuinely curious. What am I missing? What makes PHP a good language?

Here are my reasons for disliking it:

PHP has inconsistent naming of built-in and library functions. Predictable naming patterns are important in any design.

The PHP developers constantly deprecate built-in functions and lower-level functionality. A good example is when they deprecated pass-by-reference for functions. This created a nightmare for anyone doing, say, function callbacks.

A lack of consideration in redesign. The above deprecation eliminated the ability to, in many cases, provide default keyword values for functions. They fixed this in PHP 5, but they deprecated the pass-by-reference in PHP 4!

Poor execution of name spaces (formerly no name spaces at all). Now that name spaces exist, what do we use as the dereference character? Backslash! The character used universally for escaping, even in PHP!

Overly-broad implicit type conversion leads to bugs. I have no problem with implicit conversions of, say, float to integer or back again. But PHP (last I checked) will happily attempt to magically convert an array to an integer.

Poor recursion performance. Recursion is a fundamentally important tool for writing in any language; it can make complex algorithms far simpler. Poor support is inexcusable.

Functions are case insensitive. I have no idea what they were thinking on this one. A programming language is a way to specify behavior to both a computer and a reader of the code without ambiguity. Case insensitivity introduces much ambiguity.

PHP encourages (practically requires) a coupling of processing with presentation. Yes, you can write PHP that doesn’t do so, but it’s actually easier to write code in the incorrect (from a sound design perspective) manner.

PHP performance is abysmal without caching. Does anyone sell a commercial caching product for PHP? Oh, look, the designers of PHP do.

Worst of all, PHP convinces people that designing web applications is easy. And it does indeed make much of the effort involved much easier. But the fact is, designing a web application that is both secure and efficient is a very difficult task.

By convincing so many to take up programming, PHP has taught an entire subgroup of programmers bad habits and bad design. It’s given them access to capabilities that they lack the understanding to use safely. This has led to PHP’s reputation as being insecure.

(However, I will readily admit that PHP is no more or less secure than any other web programming language.)

What is it that I’m missing about PHP? I’m seeing an organically-grown, poorly-managed mess of a language that’s spawning poor programmers.

So convince me otherwise!

and there are a lot of nice answers , i liked this one form Gustavo which is :

Ok, let’s use a nice car analogy to understand the complete pointlessness of this discussion:

Cars kill more people than any other means of transport.
Car’s engines are very old technology, we haven’t even got 100% outta them yet.
Not even 70% for that sake.
Cars have been on the list of the most harmful things to the environment.
Cars have been the victims of poor design, only a few years ago did they invent the seat belt, and don’t get me started on the air bag…
Cars have a loony behind the design process, they don’t agree on the shape, the colour, the braking system, the transmission (rear/front/both), the gear system, the fuel they use and I could go on and on and on…
The guy that invented the 3 pedals for the controls deprecated loads of other more “sensible” ways of control, like mind reading.
Cars have this thing called extras that most vendors seam to make profit on, what’s that?!?!?
Cars have so low security that almost anyone can jump start one. That’s very bad for the beginners. I think….
If you sleep behind the wheel of a car it will crash. How did this creep into the design of this tool?
If you don’t by one of those extras that the salesman was offering, the car will not fulfil it’s intended goal, take you from point A to point B. You could find yourself on point P.
Most of the users of a car are very lacking in skills. They drive like maniacs and think the road belongs to themselves. That makes for very poor usage of the car.
Ok, I think you get it.

So… with all this against them, all this long, harmful, unattended, stupid and nonsensicle development in this tool, how the heck is it so popular?

Probably because you wouldn’t use a bathtub to get you from point A to point B. (The point is having a tool for each job)
Probably because, even if quite full of problems, it’s easy to use and is the one with the most support. (Repair shop at every corner, wide spread means of refuelling)
Probably because there is a very low entry barrier to hop on board.

Either that or, like Asterix always says: “These Romans must be mad!”

Wouldn’t you agree?

Thanks Gustavo your answer was really Great , I like it very much so I did make a post about it here :)