Live data from Hacker News

PHP is much better than what you think

fabien.potencier.org

301–310 of 346 posts

Re: PHP is much better than what you think

#301
post #17
post #5

> PHP must have done something right, no? Shitloads of people also believe in organised religion or naturopathy, doesn't mean that's a good thing. > PHP is the best web platform... ever. So because it's nearly caught up with other languages and you can install stuff easily if you have the prerequisite of knowing about composer? Bullshit. I'm sure composer is great, but if your main argument is that PHP requires zero…

Honest question: Do you have more than a months professional experience writing modern PHP? While I love appreciate the Java ecosystem with amazing stuff like Play framework, Scala, Camel (several apache sub projects actually), Python micro frameworks etc there still is something magic about PHP. I still haven't made up my mind but there is something about really fast turnaround time, transparency, and shared nothing…

I have years of professional experience writing PHP.

It's much slower to develop in or get up and running than any other language I have experience with.

Now it was faster when I had no experience, absolutely. That's solved with a few hours of reading docs and playing around. Then the other language is likely faster turnaround, easier to setup, etc.

And besides I'm not even convinced that "easy to set up" is a metric you should be using when you are deciding on a language for a non-trivial project.

Re: PHP is much better than what you think

#302

IMO, more important than the language itself are the frameworks built on the language. Ruby might be _the best_ language ever, but without Rails it wouldn't have gotten famous. It wouldn't have mattered so much that Python is a beautiful language if Django sucked. If a good framework came out of the PHP community, we could forget that "PHP sucks". A good framework which prevented you from doing stupid things would be…

I actually think that the PHP language itself is the cause of this framework disparity.

Alot of those nice framework features rely on higher level language features that are missing from or atrocious to use in PHP.

Re: PHP is much better than what you think

#303

I disagree, just because PHP has recently obtained features long available in other languages doesn't bring it close to being on the same level. All the other ecosystems are still light years ahead in terms of features, and contain fewer gotchas.

What? You mean that while PHP figured out library management the other language ecosystems weren't just sitting on their hands?

Re: PHP is much better than what you think

#304
post #24

Earlier quoted context omitted.

I very specifically didn't say that PHP couldn't be used to build real products, but that still doesn't (at least on it's own) make it good or make it the best.

I guess the worlds most popular websites, and the vast millions of PHP programmers must all not really exist. They can't exist, and can't be making good stuff, because PHP is just doesn't work. Here is a list of template languages people on 'real' platforms use: Python. Airspeed, Castalian, Chameleon, Cheetah, CubicTemp, Django template system, Elements, EmPy, Evoque, HRL Powerful macro preprocessor for HTML, Genshi,…

You literally just repeated all of the things that I just got done addressing. You also continue to ignore that I said NOTHING about PHP not being usable for "real sites".

I also, still, don't get your point. There are other templating languages for PHP too.

Again, your deployment argument is just as silly as your availability argument. It's trivial to deploy to Azure (sites) or Heroku, or Ironio or gondor, or any Go project, or etc, etc.

>There are millions of hosts to choose from at tiny prices, who can provide support because they know the platform.

Are you even reading what I write? Please show me a real webapp with actual users hosted on el cheapo shared hosting.

Re: PHP is much better than what you think

#305
post #136

OK, I hate PHP. It's ugly, and I don't want to code anything with it. Good developers mostly aren't available to small shops like mine; I don't have anything to get them in. I must do with young, cheap developers anyway. Young cheap developers knows only one language, to be chosen among PHP or Java (that's just the way it is). So I'm getting a whole lot of interns coming in for two months at a time, and they mostly k…

Using intern developers to write PHP. I really hope you're using a framework, because that above sentence is a recipe for disaster.

No, we're using careful project management, code reviews, the interns are very happy because they're learning a lot, and the code is tolerable. Code elegance doesn't put food on the table, anyway.

Re: PHP is much better than what you think

#306
post #255

Earlier quoted context omitted.

> And yet the threads are always full of these apologists, claiming PHP is awesome because facebook uses it, or because every cheap shitty webhost has it installed. Never making any actual argument that PHP is good That is the argument. PHP is good b/c it allows a lot of people to be productive. C is probably a better written language then Ruby, but it doesn't matter b/c if you're doing web development you're not goi…

PHP allows a lot of people to be productive. Python/Ruby/whatever language higher up the power curve allows fewer people to be more productive. Is it really that hard to understand that different levels of expertise suit different tools?

Then these threads are like carpenters arguing that hammers are stupid because we've invented nailguns.

Re: PHP is much better than what you think

#307
post #109
post #12

I'd stay away from a language that has function names like array_keys or allows you to write array("a" => "green", "red", "blue");

What's wrong with array_keys? It's extremely useful. Java has keySet(), Ruby has hash.keys, etc. Your second argument is even dumber. Yes, PHP lets you do lots of things, which improve the speed of development. If you don't like it, don't write it that way.

see, you don't get it. Arrays don't have keys. Reading this function name makes no sense.

Re: PHP is much better than what you think

#308
post #278

Earlier quoted context omitted.

No serious PHP developer actually go to php.net to read the documentation, literally all of the big PHP editors/IDEs come with an embedded manual so when you write strpos( it automatically tells you the order of variables. If I really had to go to php.net to look up order of variables or even a function name then I wouldn't be programming in PHP at all, would take too long. Thankfully, since I'm not restricted to not…

You're basically saying that no serious PHP developers are using, say, VIM or Sublime Text, which is not true. I still hit php.net from time to time.

Yeah, this is me too. I haven't done much PHP in the past year, but when I did, PHP.net was ALWAYS open in a tab or two. There was NO WAY you were gonna get me to use some bloated nasty Java based editor just to have code completion. Honestly though, Stackoverflow is my goto point if I want the better parts of php documentation comments. An answer with 7 or more votes is worth taking a look at.

Re: PHP is much better than what you think

#309
post #292

Earlier quoted context omitted.

I wouldn't pick on the example, but you've made me curious: how does it improve the speed of development to have array("a" => "green", "red", "blue") ?

This is just a side-effect of the fact that arrays in PHP are also hash-maps. That improves the speed of development, not your example.

And you think it's a good idea to have arrays be also hash maps?

Re: PHP is much better than what you think

#310
post #259

Earlier quoted context omitted.

and for every startup company using php, there are 100 shitty local ad agencies knocking out brochure-ware wordpress sites.

Sounds like a big success for Wordpress and PHP to me

In the sense that McDonald's is a big success for American cuisine, sure.
Post reply on HN