Live data from Hacker News

PHP is much better than what you think

fabien.potencier.org

31–40 of 346 posts

Re: PHP is much better than what you think

#31

I am so sick of this kind of talk. What language do you like to code in? Really? That's great. Now shut up and go code in it. What difference does it make to you that I use PHP, Ruby or original ASP? My website achieves the result I desire. I chose the programming language I use because of reasons that made sense to me and my project, not because I want the approval of a bunch of hipster start-up kids.

Mate, nail on the head.

The way I see it, is if the final item is as you've envisioned it, what difference does it make what it's written in?

Re: PHP is much better than what you think

#32
post #13

PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days. For those of us who aren't afraid of a little ops work, there are far b…

"PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days."

And that's exactly why PHP is the better choice for those of us who distribute software to non-technical users.

Re: PHP is much better than what you think

#33
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'd argue PHP is, for any project of reasonable size, harder to get up and running than say Rails. For any serious development a PHP developer (some experience, did several years of PHP dev) will have to setup a local instance of Apache/ MySQL/ PHP and deal with making sure libraries installed on this dev server match libraries on the production server.

When it comes to deployment for both Rails (in this case) and PHP you can choose between pretty automated providers like Heroku/ PHPFog which make git deployment trivial or you have to deal with server set up and configuration.

So I'm not really sure these days that for anything except the smallest projects PHP just works any more than any other reasonably popular web language?

Re: PHP is much better than what you think

#34

"PHP is the best web platform ever", because it (finally) has a decent package manager. And don't mind that far fetched statement, the author will surely delete any rude comments. Congrats, PHP has a package manager. This does nothing to shake my feeling that PHP's most ardent advocates have little hands-on experience with the more full-featured alternatives. You know, like the ones that also have decent package mana…

To put my comments in another light, let me postulate this. If I started a project in python, Go, ruby, C# or even something that ran on the JVM, I could give reasons for why I would choose it for something non-trivial. Outside of "I can hire cheap devs" and "I can run it on el-cheapo hosting", I can't think of a good reason to specifically pick PHP.

Re: PHP is much better than what you think

#35
Namespaces, closures and traits are "all the bells and whistles you might dream of in a modern web language"? Really? Now I understand why Lisp users are smug. And that's ignoring the basic syntax touted as a feature.

What I actually dream of in a web language (or any language, for that matter) is quite a bit more. I want to be able to get event-driven IO without writing event-driven code. I want to get parallelism for free or as easily as possible. I want to encourage smaller functions and reduced coupling. I want good, or at least decent, performance with no especial effort. I want a consistent and elegant underlying design rather than an ad-hoc collection of features somebody thought were useful.

Ultimately, I want a high-level, modern language that's concise, fast to write, easy to maintain and reasonably performant. And PHP is none of those things. Which is why it's no good.

Re: PHP is much better than what you think

#36
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,…

Saying PHP is good because Facebook use it is kind of like saying phone hacking is good because it was utilised but some of the UK's most popular newspapers...

I'd be interested to know if there's any commentary from people high up in Facebook on whether they'd use PHP again if they were starting now?

Re: PHP is much better than what you think

#37
post #21

"PHP is the best web platform ever", because it (finally) has a decent package manager. And don't mind that far fetched statement, the author will surely delete any rude comments. Congrats, PHP has a package manager. This does nothing to shake my feeling that PHP's most ardent advocates have little hands-on experience with the more full-featured alternatives. You know, like the ones that also have decent package mana…

Facebook.

Yes. And now Facebook is spending a ton of resource and man-hours programming around this. They had to write their own compiler!

Also, I think they are trying to move away from PHP as quickly as possible without rewriting the entire site. The new projects and tools are not in PHP; moreover, I think most of the new people they hire never have to use PHP at all.

Finally, just because they managed to use PHP to run a bit site does not mean it is the best web language, or even a good web language. It just means it's adequate.

Re: PHP is much better than what you think

#38

"PHP is the best web platform ever", because it (finally) has a decent package manager. And don't mind that far fetched statement, the author will surely delete any rude comments. Congrats, PHP has a package manager. This does nothing to shake my feeling that PHP's most ardent advocates have little hands-on experience with the more full-featured alternatives. You know, like the ones that also have decent package mana…

When I first started looking for work here in Dublin, Ireland a few years ago, I saw tens of PHP web stack jobs, 1 RoR job and no Python jobs. While the tides have turned slightly, PHP web stack jobs here still far outnumber Ruby and Python equivalents, especially at the entry level.

Some developers like PHP because they can get easily work doing it. Businesses likes PHP because they can more easily hire people.

Arguments about PHP's ugly and stupid syntax are moot, it has been enabling companies to get shit done with developers at different skill levels for years.

Re: PHP is much better than what you think

#40

For reference's sake, this article is written by Fabien Potencier, the creator of the symfony framework. This guy's probably single-handedly responsible for lifting the PHP community to a higher level, by making great software (which, when he started, was pretty unique, with horrible hacks-upon-hacks like CakePHP being the norm), and by showing people how to do so.

yeah he has done an amazing job.
Post reply on HN