Live data from Hacker News

PHP is much better than what you think

fabien.potencier.org

201–210 of 346 posts

Re: PHP is much better than what you think

#201
post #129

Earlier quoted context omitted.

Citation needed. Both CPython and MRI are slow - if you need computational speed, use something else. But when your are comparing them to each other, CPython is faster. I don't know where you are getting that significantly faster bit from. Since most benchmarks are unscientific, this one is as good as any. So here goes: http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...

I suspect that parent was referring to the python 2.x branch, which has been catching up with ruby 1.9, but on most benchmarks started at ~ 3x slower and are now ~ 2x slower. Since benchmarks are completely worthless, let's just stop this pissing match right now.

> I suspect that parent was referring to the python 2.x branch, which has been catching up with ruby 1.9, but on most benchmarks started at ~ 3x slower and are now ~ 2x slower.

Citation needed again. Ruby 1.9 is slower than Python 3, and Python 3 is slower or as fast as Python 2 on Python official benchmarks.

http://docs.python.org/release/3.0.1/whatsnew/3.0.html#perfo...

> Since benchmarks are completely worthless, let's just stop this pissing match right now.

Benchmarks are far from worthless. And pissing match? Asking for citations amounts to pissing match? The parent claimed something that isn't true(ruby 1.9 significantly faster than CPython - that has never been the case). And you are adding python 2.x was slower than 1.9, when 2.x is generally faster than 3.

I love ruby as much as the next guy. But when it comes to execution speed, ruby has always been the slowest among ruby, python, and perl.

Re: PHP is much better than what you think

#202
post #126

Earlier quoted context omitted.

I have not found this to be the case. There are a lot of small/medium sized companies that probably started out with a custom Drupal/Wordpress site and have now out-grown it, but don't want to re-write the whole system just so that they can use Python/Ruby. Using PHP is then a no-brainer and so moving the codebase to Symfony2 is a great option for them. While Wordpress and Drupal command such a large share of the web…

How is moving to Ruby/Python needs a rewrite, but moving to Symfony2 does not?

If you stay on the same web stack you might be able to migrate one piece at a time.

You also have the option of refactoring the most important or troublesome bits of your app to use Symfony2 while leaving the rest alone.

It's pretty challenging to take one piece of your big web application and migrate that to Python while leaving the rest in PHP. So you'll tend to do it all at once. That's very expensive, and very risky, even if your original ugly PHP site had an extensive test suite, which it will not.

Re: PHP is much better than what you think

#203

Earlier quoted context omitted.

> "Half baked" Meh. jinja.pocoo.org > "better documentation" By what measure? docs.python.org is just as good (if not better.)

Python docs are way better on a technical level IMO (more detailed, more accurate - if you want to know what a function does in PHP you need to spend hours reading through the massive comment threads to find the corrections, and then ignore the comments from years ago since the API changed and the comments didn't, etc etc); but much like the rest of PHP, the PHP docs are incredibly convenient - php.net/function_name…

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 notepad I don't have to worry about this aspect.

Re: PHP is much better than what you think

#204
post #111

Hacker News really doesn't like PHP. There's a whole lot of blind prejudice in this thread Arguments against PHP are as futile as arguments in support of PHP. It's a programming language. The only thing that matters is the person using it. I'm sure Ruby, Node and Go are super duper awesome in a lot of academic ways, but unless we're talking about awesome things that have been made with them, it's just blah blah blah…

I don't think not liking language so broken as php is a blind prejudice. That language is garbage. His creator said so many times. You don't have to care about that, but don't act like it's not true.

It would be easier to "act like it's ... true" if that statement weren't so damn objectivist. It's a non-ideal language that runs most of the web. There's an incredible nuance to that truth that makes it difficult to say that it's "garbage" (useless? no. unworthy of your time, maybe. I don't know what that means) I just don't get how people have time to be such puritans about things that don't immediately pertain to them and need so badly to make a binary judgement.

Disclaimer: never touch the stuff myself.

Re: PHP is much better than what you think

#205

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.

The difference it makes is that with PHP being so popular, it gets a lot of support from cheap web hosts (often being the /only/ language supported), and thus if you write software to be deployed, PHP is the only option, thus it gains popularity, thus nothing else gets supported. I've been working with PHP for ~8 years, having it as my main source for income, and I'm /still/ finding new and interesting things to hate…

This comment completely describes my situation.

PHP is like javascript: I use it not because it's good, but because it's what's available.

People can bitch about PHP as much as they like, but my project for today is hosted on a server running PHP 5.2.4. I don't even have shell access; only FTP.

Re: PHP is much better than what you think

#206

Earlier quoted context omitted.

To me, every PHP version being vastly better than the previous version says something: the current version is shit too, it's just going to take another few versions until you admit it :P Compared to something like python, where version 3 has basically one major improvement over version 2 (ie, a unicode core); everything else was done pretty much right the first time, and massive changes aren't needed. Heck, you can s…

If I plot two lines on a graph for you: y1 = 0.02x + 1 y2 = 0.10x + 0.5 Regardless of the fact that y2 started at 0.5, fully half of what y1 started at, at some point y2 overtakes y1. It's impotent to whine endlessly that a language used to be bad. So PHP 5 years ago was terrible. PHP today is 'nearly as good' as Python (I'd argue it's better). In 5 years PHP is going to blow Python out of the water. These languages…

I think your graph is accurate when it comes to the amount of effort put into polishing each language -- but as to actual quality, I'd firstly say y=1 is the goal (the language is basically complete; you can add more around the edges, but the core is solid and needs no more changes), and it doesn't account for the fact that with a constant large amount of effort as input, progress as output slows down exponentially due to backwards compatibility concerns. As such, I still think that starting off good and evolving slowly is better than starting off awful and rapidly turning into a giant blob of band-aids :P

Again with the scales, I agree that PHP is great for getting things done to start with, and once you've started with something then carrying on using it is easier than changing. That's why my biggest and most successful project still uses PHP, even though experience has taught me that everything else is more productive after the initial setup hurdle~

Stability, agility, and testability have been in other languages for decades, and in all three cases other languages have done them better, so I'm not sure why PHP having them since 2005 is supposed to be a good sign...

Re: PHP is much better than what you think

#207
post #182

Earlier quoted context omitted.

What's so horrible about CakePHP?

Its legacy (who wants to still support PHP4?). AFAIK, it's no longer maintained; I believe all the core development is now taking place on the Lithium project: http://lithify.me/

Isn't Lithium just a fork? CakePHP 2.2 was released just a few days ago and they dropped PHP4 support in 2.* I think.

Re: PHP is much better than what you think

#208
post #184

"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…

"PHP's most ardent advocates have little hands-on experience..." And from what I've been seeing, PHP's most ardent critics have little hands-on experience with PHP, itself. Edit: see this http://news.ycombinator.com/item?id=4198900 current rambling nonsense I'm having to contend with. Edit edit: the voting is up and down, I can only assume that ~ 50% of this community just don't care about facts and would rather subs…

Yeah, sure seems like this guy has no clue about PHP alright: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

Re: PHP is much better than what you think

#209

Hacker News really doesn't like PHP. There's a whole lot of blind prejudice in this thread Arguments against PHP are as futile as arguments in support of PHP. It's a programming language. The only thing that matters is the person using it. I'm sure Ruby, Node and Go are super duper awesome in a lot of academic ways, but unless we're talking about awesome things that have been made with them, it's just blah blah blah…

> Hacker News really doesn't like PHP. But Y? function Y($F) { $func = function ($f) { return $f($f); }; return $func(function ($f) use($F) { return $F(function ($x) use($f) { $ff = $f($f); return $ff($x); }); }); }

Honestly, and with complete sincerity, that just means you're a bad programmer. It has nothing to do with the language. And trying to correlate the two is makes you look even worse.

Re: PHP is much better than what you think

#210
post #24

Earlier quoted context omitted.

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?

There is such commentary from people who left facebook to do their own thing. They did not use PHP. http://www.quora.com/Quora-Infrastructure/Why-did-Quora-choo...
Post reply on HN