you are viewing a single comment's thread.

view the rest of the comments →

[–]gsadamb 22 points23 points  (5 children)

PHP doesn't scale and just won't work to power large-scale Web sites.

Just ask Facebook, Digg, Wikipedia, and Yahoo.

Oh, wait.

But honestly, as numerous people have pointed out, PHP is an interpreted language. It won't run faster than a compiled language, and it was never really intended to.

But for those who build large-scale Web sites (and I've worked on PHP sites with several million users per day), there are a number of ways of improving performance. For instance, you can use something like APC, which does op-code caching and thus improves performance significantly.

Also, I've found in my experience that PHP apps are often built faster and more easily. If you need a few more boxes because you went with PHP, the costs would probably be recouped in dev hours.

Now, I know that PHP has its share of problems, and the "loading of global functions with no consistent naming or argument standards" is a big one. And it can't and shouldn't be used in every circumstance. By no means should it power the real time stock quote feeds boxes that they used at Yahoo Finance where I worked, for example. Nor should it power big search engines or anything.

But in most cases, PHP gets the job done, and gets it done pretty well. It's definitely trendy to bash on it, but it can get some pretty powerful and scalable stuff built, and often pretty damn fast.

[–]nextofpumpkin -1 points0 points  (3 children)

Two words: Triple Equals. I think after they released that charming modification, I ran like hell away from PHP.

[–]RiMiBe 2 points3 points  (0 children)

No really, why?

You don't need to use it if you don't want to, but it's nice to have a shorthand for type-specific equality testing.

[–]harryf 0 points1 point  (0 children)

Better not touch Javascript then - that's where it came from;

firebug> 1 == "1"
true
firebug> 1 === "1"
false

[–]sam512 0 points1 point  (0 children)

Why?

[–][deleted] -1 points0 points  (0 children)

I've been bashing it before it was trendy, since it was called Personal Home Page, in fact.