PHP needs a vision
news.php.net
news.php.net
http://news.php.net/php.internals/64771
> The vision has been the same for years. A general purpose scripting
> language with a focus on web development. You are simply saying you want
> the vision to be more specific than that because everyone has a
> different view of what web development means. But even if we narrow the
> vision, it will still be open to a lot interpretation. We try to strike
> a balance between the different and changing views of web development
> the same way we strike a balance between appealing to weekend warriors
> and top-100 trafficed sites. No vision statement is going to answer the
> question of whether annotations should be in docblocks or in the core
> language. That's simply not what vision statements do.
>
> -Rasmus
Maintaining clarity of purpose in a project can be difficult sometimes. Kudos to Rasmus for managing to do so in the midst of what looks like it's gearing up to be another php.internals shitstorm.So all that's left for me is 'focus on web development'. And to be honest: I think today it is not even so good at that. We have server side JS (Node), Ruby, Python and Java -- all freely available with huge communities. Does PHP stack up against these today?
I sure see that back in the days, when cgi scripts in Perl were the norm, PHP had huge advantages over its direct competition in open source web dev land.
To me Rasmus merely underlines the lack of vision, or ability to act on one.
I think the Symfony team actually has the vision: provided it has to be with PHP, let's make a full stack web development framework (like Rails) that does not suck, and create heaps of interesting components/libraries that can be used perfectly on their own in the process!
These guys and girls are showing to what extend PHP can be pushed, they also build a fair share of general purpose libs that the PHP community badly needed (e.g.: composer).
It you are looking for PHP with a vision, line yourself up with Symfony: they seem to have it.
Jokingly: If web development is what PHP is useful for, then Symfony simply needs to be shipped with it :)
Plenty of vision is communicated from their site, and it all makes sense:
The support and tooling they've managed to come up with is great, rivalling some of the more mature languages. Definitely a good "side" to hitch your wagon to.
PHP happened to be the language that websites were written in at a time when the old Java guard came into management positions, bringing with them their failed ideas of what "professional" software design means.
I don't see why you think it is more justified for PHP to become J2EE than Rails/Django. PHP as a language doesn't support one style any better than the other. The only thing that really sets PHP apart from other dynamic languages is that it is a page template engine by default.
So if you absolutely have to ask one of those "why turn PHP into xyz?" questions, why not ask "why turn PHP into anything other than a page template language?".
The answer to all these questions is, because programming languages are indeed languages. People use the languages they know to say the the things they need to say and they use them to experiment with new ideas. That's a good thing.
I don't. But like you said (IMO, your comment is spot on), PHP has suffered from the Java mindset. Though I do think that people should not have a language do everything. But thats a problem at the enterprise level, where one size fits all.
More concretely- what's an easy non-web task that Ruby (as you suggest learning) is great at that PHP can't handle just as easily? Not trolling here, I'm genuinely curious.
It can be done. It is not something I would recommend under almost any circumstances. (But, then, I wouldn't recommend Ruby for any-any circumstances, so...)
* PHP_SAPI is defined to 'cli' (as compared to 'fastcgi' or similar)
* $_GET/$_POST are empty, and $_SERVER is missing the HTTP_XXX variables (duh)
* By default, there's no max execution time
I dunno, it works perfectly fine for me. It's certainly easier to read and write than shell, and I genuinely can't think of a time that an ini directive had any effect on what I was doing - unless you count the presence or lack thereof of an extension, but everyone knows that PHP's extension handling is pretty crappy.
I guess it all depends on what you're trying to do. I agree that stream handling is a little rough, although that has little bearing on what I tend to do (YMMV).
At the end of a day, it's a tool, and I have tasks that need to be done. That tool either is or isn't capable of accomplishing those tasks, and based on my own abilities it may or may not be faster than using other tools (contrary to popular opinion, I find Ruby extremely painful to work with, and avoid it at all costs; if it works for other people, good for them!)
This could be a case of "when all you have is a hammer...", but maybe I just happen to have two nails: http://www.codinghorror.com/.a/6a0120a85dcdae970b017742d249d... ;)
/edit: typo
Is there a decent analog for Nokogiri? I stopped paying attention to PHP 6 years ago so I don't know, but a friend of mine needed to do some webscraping today and learned Ruby and then built his script in 5 minutes.
I checked the IRC timestamps between his "it's done installing" and his "hey, look what it outputted". It was seriously 5 minutes. He then went on to do something a touch more complicated (scraping multiple pages and a trivial analysis/report of the results) and that couldn't have been more than another 30 minutes.
(ETA: I don't know if you'd consider webscraping to be non-web. I guess we could swap it out for a bunch of XML files since that's basically the same task.)
* The bindings for making anything GUI-ish lack. Horribly. I doubt there is one application like an editor written in PHP; that is actually used. * Its long-threads are ... lacking; You cannot write anything deamon-ish in PHP. * Memory management, as Ramus puts it, is not a concern "I just restart Apache". That makes it unusable for anything bigger then a small CLI-tool. * The Cli-libraries are decent, but far from things like Ruby's Thor.
You can write CLI-tools just fine, but "general purpose" is much more then "Managing Web-Content And Some CLI tools".
The one-liner's are quite nice too… Just today at work I needed to come up with a base64 encoded json string from a data set in an ini file to pass into my Java app via stdin. It was something like:
php -r 'echo base64_encode(json_encode(parse_ini_file("app.ini")));' | java -classpath Foo.jar com.example.foo.App
So… yeah. I don't think it's fair to say that "PHP is terrible at being a general purpose language". You just haven't done enough of it yet to appreciate it.Hey now. Let's not forget everyone's first love: Perl. :D
It's still quietly running quite a few big sites out there, and is currently enjoying something of a renaissance with frameworks like Mojolicious & Dancer, not to mention the releases of 5.10-5.16.
On the other hand, Dr Dobbs thinks:
"...Perl continues its long decline. According to Google trends, the number of searches for Perl is 19% of what it was in 2004. Its declining role in open-source communities further cements the perception that it's in an irretrievable tailspin."
http://www.drdobbs.com/jvm/the-rise-and-fall-of-languages-in...
> 1. "PHP Should Strive To Be A Full Featured Object Oriented Language".
> 2. "PHP Should Remain A Procedural Language WIth Some OO Features"
> 3. "PHP Should Be Implementation Neutral, and Support All Paradigms Equally".
Rasmus' response was more general, about the vision for who and what they'd like to enable with the language.
There may be a bit of cross over, but they are two distinctly different views. And for what its worth, I think both are correct. I think PHP should choose to be one of the three things Anthony suggested, and stick to it. This would help in discussions about what features to take on board in new versions. I also think that Rasumus is right in that PHP is a general purpose scripting language with a focus on web development. However this is more about the type of people you will get interested in using and contributing to the language.
EDIT: Grammar
After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time.
I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludgey its history is, how inconsistent the syntax is, etc, it really does work well. I'm now doing PHP development at my current job and it's been fine.
One thing I learned from a previous job was the saying "Your customers don't care about your technology. They care about you solving their problems." If you are solving their problems, they will pay you, regardless of whether or not your back-end is CGI, perl, PHP, or whatever.
As for quality...
No, Wal-Mart isn't a purveyor of items with the qualities of being expensive, extremely limited, and old.
Quality is a subjective word, defined by different aspects. Just as I can, with justification, define Apple as a purveyor of low-quality hardware, I can say equally it sells high-quality software.
- coherent
- non-verbose
- provide solid high-level abstractions
- safe
- have a solid standard library
- optionally, easy to get started with
Of all these qualities, PHP is geared toward "ease of access" with a sprinkling of non-verbosity, and fails mostly or totally in the other categories. Just like the popularity of the Millenium trilogy does not mean Stieg Larsson can write, the popularity of PHP is more an indication of its low barrier to entry (especially combined with widespread hosting support) than anything else.
Technically, it does. =)
I'm surprised you wouldn't consider the license a language is released under as one of the factors. Or maybe you do, and you forgot to list it. And therein lies the issue: the number of people are indicative of certain qualities, qualities you might not consider important, or might not weigh as highly as other people.
I love erlang, but I'd be hard pressed to use erlang for as many projects as I would like. Not because of failings of the language itself, but because certain qualities it does not possess (ubiquity for one, which affects so many other areas).
I guess you can quibble about definitions all day if you like, and you can take "family heirlooms" literally instead of metaphorically as it was intended, but that won't make Wal-Mart a seller of quality items nor will it make PHP a well-designed language under any sort of definition that is relevant to reality.
And, honestly, if the only thing we're going to argue about is whether or not quantity equals/implies quality and the definition of "quality", the argument against PHP has already won.
http://arstechnica.com/business/2011/12/facebook-looks-to-fi...
For what it's worth, PHP 5.4(without APC) performed better than both Python and Ruby on that language shootout page: http://benchmarksgame.alioth.debian.org/u64/which-programs-a...
In a year or two start using rails. You'll come back to PHP and wonder why anyone would ever make a hammer with two claws.
A more apt comparison is rails with symfony2 or zend framework2.
I've done both, rails was much more pleasurable. See? I just compared the overall experience of a language with that of a framework.
Do you realize what you're saying?
edit: replied to you as if you were fleitz. Point stands as you basically parroted what he said.
I'm sure this process makes upgrading painless, just unzip the framework and... wait... all your changes just got overwritten.
This kind of crap is exactly why everyone with a clue laughs at PHP.
Everything you said I rail against daily. Stop bringing your bad habits into PHP, we have enough of them already.
You would upgrade your Laravel framework with composer, which runs on Git. And it'll most likely just work without any "Gem hell" that i've come to experience with some other languages.
Laravel says, hack shit directly on your webserver.
If you're supposed to use composer, why don't the docs say this? Instead the docs say, unzip and hack.
The docs clearly explain that your bundles go to the "bundles" directory, controllers go to the "controllers" directory, views belong in "views" and so on. And your whole application resides in a directory called... "application". You'd actually have to be pretty advanced and amazingly stupid at the same time to make a functional app in the framework core folder and than destroy it by overwriting.
Rails docs don't tell me to unzip the framework and start hacking, but they do instruct me to run "gem install rails", wait a couple of hours till it's done, then run "rails new blog", "cd blog" and then start hacking. Neither set of docs tell me how to setup version control before i begin my work, and they shouldn't. That's not the job of the framework docs.
And of course you're gonna hack your application directly on the server, albeit a local one, as PHP applications are typically developed. This in no way prevents you from using version control and proper deployment techniques.
"PHP Should Be Implementation Neutral, and Support All Paradigms Equally".
This is what I like about PHP. When you want a 4 page site, you can use procedural and functional programming. When you're working on an enterprise level CMS you can whip out the OO paradigm and you're set. PHP is a messy soup but it does web better than most other languages.In a way this means nothing: experienced programmer can program in any language.
In another way it is wrong: experienced programmer know how so well that building a solid application on rotten grounds is a pain, and would prefer a more solid ground to build their application upon.
Do I need to list again all the mess in PHP?
But calling Magento "Java written in PHP" without offering alternatives, specific criticism or any backing of the argument is just childish.
A lot of the PHP libraries looked like thin wrapper over well known c libraries. Instead of shoehorning everything to make it PHPonic, the function calls were similar to their c counterpart. You could sometimes even read the man pages for the c libraries if you needed extra details on how the internals worked.
There was a simplicity to this that was appealing to me. The lesser amount of magic and abstraction meant I could more easily visualize what was happening under the hood and find bugs quickly.
That's the scariest thing about the language. The php will run whatever you write in the script; assuming things, hiding errors, etc..
http://php.net/manual/en/security.globals.php
5.3.0 is 2 and a half years old.
"Now just marginally less braindead than every other language" isn't exactly a selling point.
Sure, it used to be worse, but I see zero commitment from PHP to actually make real steps to fixing the situation. A real first step would be to start working on a 6.x release that actually removes the gazillion deprecated-but-still-present-and-thus-used things in the language.
"PHP's vision is being simple and practical and focused on the web. PHP is what people use to get their first site off the ground. PHP is what a web designer learns when he/she wants to go into programming. PHP is what a random Joe uses when he needs to whip up a page and he's in "do it yourself" mind. PHP is what you expect everybody to be able to handle, and everything to be able to run. It is not to serve everybody, every use case and every possible need."
Frankly, I don't understand this vision at all. Is PHP supposed to be a beginner's language that a webdev eventually moves on from? I mean, don't get me wrong: I used PHP for exactly that when I graduated from high school. But is the directive really, "Real programmers don't use our language"?
Does that mean that it is also a beginner's language that people eventually are supposed to move on from?
My programming carear startet with perl -> php -> python and i found one holy grail to solve most of my problems. Python had an easy entry point the same as PHP but when you jumped over the first learning curve and discovered the complete ecosystem it`s mindblowing.
I never had that feeling with PHP you could do websites and thats it. And most of the time it gets a mess real quick. PHP will slowly phase out over the next decade.
To be blunt, that's not universally true. I've moved on to Go, with an eye for more functional languages this year.
Python is great, but it's not the last language.
> PHP will slowly phase out over the next decade.
Wanna bet on it?
Wordpress.
It's become a full blown CMS and its own platform. Half the media sites out there are running it, or hosting with Wordpress Pro. Then there's a horde of casual bloggers managing their own installs.
Granted, there's movement away from this kind of publishing model(Facebook, Twitter, G+), but as long as Wordpress is still the go to, "set it and forget it" app on $5 webhosts, PHP will not die.
It's a nice language, but it's not for everyone.
Sure, it's good to keep your mind open, investigate other possibilities, and keep your eyes forward... but if you're able to draw the pictures you want and like, it doesn't matter if you're using crayons or oil paints.
ETA: In fact, compare:
Anthony's view is that of someone trying to make the language better for those of us who use it day-to-day. To make it a real contender in web languages, because it does have that potential.
>>>> The directive is and always has been along those lines, "real programmers don't use PHP". For some reason the core team has pushed that.
This is false, core team never pushed anything like that.
>>>> But is the directive really, "Real programmers don't use our language"?
Of course not. How any of the examples given about say any of the people mentioned aren't real? Do you consider real programmer be only guy who writes incomprehensible code in incomprehensible language that does incomprehensible things?
Programming languages are hard to change, very hard, because it will certainly break programs written in it in many places. So if you want a programming language with a vision you should start with it, or simply accept it has no vision and it merely goes with the whim of its maintainers. The latter is what I believe happened to PHP. No biggy, there are plenty of languages that do have strong visions and are very suitable for web-development; just move on.
If PHP was to implement a vision, it would soon not be PHP anymore, whether that is a good thing is up to the users of that language. In that case I foretell a hack of a lot of porting effort and a fork (facebook?)... :)
It's always hard to do large language changes, but it's not impossible. E.g. consider the change that PHP did from version 4 to 5. That was a pretty major paradigm shift, with lots of broken code, but it worked out well in the end :)
The funny part is, it did not make things better.
Ruby is more OO then Java for the reason you give, still there are primitives but they have a thick OO-coating so you are less likely to notice they are 'different'. Try subclassing a Fixnum -- it works! But Fixnums have no 'new'.
Mostly in the way that stuff was added.
First: Community like HN and such, have lot of good and smart people, however, lots of us are what I like to call "tech hipster", they like to always brag about how they prefer some new-shiny language/framework whatever, as if that means they know more than the average developer. Like an hipster when it comes to some underground-indie-band.
It's pretty fun to see this, I laugh quite a lot TBH. And because of this PHP is looked upon as a mainstream language, like POP music, always number one on the charts, always on the frontpages, but like POP it lacks quality, good taste and so on (what some people think at least).
So, many of us, just hate PHP cause it's POP and using a POP language is cheesy and lame...whatever...and they just hate PHP because they read someone else's saying it sucks. eg: "PHP sucks, because I use X"
Second reason: Other people on the other hand, have really fundamental reasons to dislike PHP, however, I noticed that a lot of these people haven't used PHP since version 4, and they are completely out of the current state of PHP. I don't mean everyone, but most of them do.
I'm not a PHP fan or anything, in my work I have to use it, although I really wish I could use Python, but I can't. So, instead I try my best to use it in the best way I can.
I'm currently using Symfony2 framework, which brings a lot of good web dev practices into PHP world. I'm looking at Laravel as well.
To be, most people still think PHP developers use a PHP as a single file where they put PHP function on the top tof the file and html at the bottom and such...and if you a good developer you can really make PHP shine these days, because there a good tools and frameworks out there.
I can really recommend the Laravel framework, it's quite elegant!
IMHO, a programming language should not just focus on itself or whether it has such and such feature, but on how it can be used in the entire software development cycle. This is something Go and Ruby are doing exceptionally well, and is why I like using them so much to build software, whether its web or otherwise. Probably because of its history as a template language embedded into HTML (way back when :), PHP has still got some growing pains in order to build up its software development paradigms, but I'm still hopefull, it has gone amazingly far and continues to improve.
PHP (the LAMP "web development platform" that happens to include the PHP language) got so popular because:
1. ease of deployment
2. ease of scaling
3! KISS by keeping the layers of abstraction few and thin (at first it was just a thin "templating" layer to reach the functions in C libs)
Only (3) has anything to do with the language itself, and is the only one the could translate to a language "vision". If PHP were to remain true to itself and its advantages that made it what it is today, their vision can only be to keep the layer of abstractions few and thin and this can only mean 2 and 3 from the OPs rant: procedural, functional and multi-paradigm enough to support OO (I know, people don't write functional code in PHP but I think they should - it really helps with KISS once you go over the "procedural brain rot").
P.S. As a developer I hate PHP (viscerally, passionately, religiously and in all other ways imaginable)! As a manager I absolutely love the "fail cheap, fail fast" philosophy and PHP is one of the few languages that enables this "flow".
I'm the first one to admit that PHP has its flaws, but that's not to say that other languages are perfect, or 'better'. PHP is a Frankenstein's monster, and no matter the quality of body parts you schlep onto it, it will probably still work. Ruby on the other hand is stricter, more consistent. If you're new to programming you can hit the ground running with Ruby (especially with the Rails framework, but if you're new to programming, would you even know how a framework relates to a programming language?). But if you want to go beyond a simple CRUD-app, Ruby poses a lot of challenges that can be hard to solve whereas PHP, well, just works.
My point is: you pick the right tool for the right job. For a lot of people, the right tool is PHP because it's the only thing they know. That's not PHP's fault, now is it? This kind of thinking reminds me of the clash between Apple fanboys and Fandroids: to each their merits, but you can't seriously state the one's perfect and the other one is utter rubbish.
Wether you like PHP or not, it's still: a) the most popular programming language b) the programming language with the most job openings (Source: http://www.udemy.com/blog/modern-language-wars/) This has to count for something, right?
So please, for the sake of keeping HN a decent place, refrain from using non-argumented statements like 'PHP must die'. You're not adding anything to the discussion and you make yourself look like a fool.
As for the 'vision of PHP': I'm glad there is none. It's the gateway drug to a lot of programmers, and I'm sure that I would have given up on programming if it weren't for PHP. When I look back on some of the stuff I wrote some 10 years ago I just want to cry, but that does show that I've grown as a programmer. It's perfectly possible for people to start out with PHP and evolve to good programmers, regardless of language used. A stricter defined PHP would just kill that.
I write PHP professionally. I like PHP programmers. I'm starting to have a soft spot for PHP. PHP and its standard library are a minefield.
There is a tremendous amount of backwards compatibility in current versions of PHP that allows one to follow the same approach to Web development that those did back 10-15 years ago with PHP 4. No, it is not "Enterprise", and yes there are security considerations to account for. But the process of adoption is key, and PHP continues to be adopted by a lot of startups/projects. Those that choose to adopt the PHP language as their advanced vernacular moving forward still continue to have a number of more advanced programming language concepts to utilize in PHP with each new release, with barely any breakage with other approaches to using PHP.
I went Perl -> PHP and have been there ever since. Not because I'm too lazy to learn another language, but because it has done everything that I have needed it to do, and when I found something that it couldn't, I looked elsewhere for that one aspect of the project.
Isn't it our role as developers to push the boundaries of our chosen language? I'm pretty sure back when Javascript was being thrown around, they wouldn't have imagined what it is today.
Trying not to sing praises, and throwing fuel on a fire that should have died a long time ago... To each their own.
That said, outside of that to make PHP work on bigger projects you end up with a lot of structure and ceremony that make PHP suck, not quite as much as Java, but it's not amazing.
Thiings like testing and testability aren't much fun in PHP. For a long time package management was a joke.
PHP is for webdev. That's it.
- PHP and many of the PHP extensions are packaged for about every major OS and architecture
- a lot of functionality is already shipped with the interpreter (so no additional stuff necessary)
- it's very easy to deploy We've tried a number of options, especially in the monitoring area, but PHP eventually seemed to be the most suitable for the job.
Python has your other advantages, quite a lot of existing monitoring software, and is a far more pleasant language to program in.
We use Python for a number of things too (and yes, I like the language a lot). The only trouble I have with Python in this context is actually cross platform support. It's a bit harder to get packages for the latest and greatest versions of modules and the interpreter if you have to deploy to e.g. Solaris 9 systems, unless you create them yourself. Theoretically it should have the same advantages, yes.
This is one of the best things of php: it's easy enough for new developers and you can grow into the OO aspects of it. While I must admit I would also like a big cleanup to make the function names and arguments more uniform, I don't hope they change anything that makes it harder to begin with php or limit the possibilities to grow.
"PHP is what people use to get their first site off the ground. PHP is what a web designer learns when he/she wants to go into programming. PHP is what a random Joe uses when he needs to whip up a page and he's in "do it yourself" mind."
PHP is a great language in that its very flexible and quick to get going with, the sad thing is people don't want it to grow up...after all, so many massive companies (FB?) use PHP for core components. Why can't those internally have a slightly larger vision...
It just makes me sad that rather than saying "look what php can do with some work!" and doing something to head in a direction that could make some of its power uses (like FB) love/like the language, the people in charge simply seem to not care.
A better positioning would be saying something like "php is a great tool to start a web project in, and over time it'll continue to be the best tool to start a project in by helping people innovate even faster." Building it into boxes and decouple it from the rest of the code down the road, like FB have, is likely what most people will do, but at least saying PHP strives to fit this need would be a better vision than saying its for "Joe's weekend website", when clearly that's just shortsighted.
Saying what you're going to do in a public place does increase your chances of following through with it. PHP should document something that says what they want to be, even if its not what some people want them to be!
I write in php for the better part of 4 years now and hate it every day. And I have written in c++ before that. Ask 20000 developers what are their main pain grievances sort them by "popularity" and just remove them one by one.
For me it is the hard debugging, the include mess and the "extremely" creative ways parsing and runtime errors are communicated to the developers.
Thanks to namespaces, PSR-0 and Composer, I no longer have to worry about "include mess". Use an autoloader, that's what it's for. If you're finding you have to include a file to access information in it, that tells me you're not testing your code.
The only error I've run across that gave me pause, for a second, was the T PAAMAYIM NEKUDOTAYIM. A quick, 5 second Google search gave me the information I needed.
http://news.php.net/php.internals/64763
The response hardly seems warranted. The vision is pretty stated there.
Stuff like this: http://marc.info/?l=php-internals&m=135083835232016&...
Sometimes he contributes to discussions in a very positive manner. But too often he degrades the discussion into BS rhetoric and greatly demoralizes contributors (I know I am not the only one to voice disdain, I may just be the first publicly)...
I guess you can say I just had enough...
1) No one from Zend or Rasmus can apply. 2) facebook - would love if you guys forked it, but you don't need my money.
More specifically: Put in proper weak refs -> get lexical scoping -> get first class functions.
Seriously, It needs to die.
Sorry...
Just like Reddit, Karma is not intended to say "my voice has more weight than yours". Karma is a way of letting people know you agree with them, but, just as in a court of law, if you can find one person willing to speak the truth they can stand strong in a house of lies.
Long and short, PHP is going to continue for some time, (just like COBOL, just like assembly) and wishing it was dead is about as effective as a life-savings program subsidized by the Tooth Fairy.
Very constructive :-)
PHP needed a vision 15 years ago. It was originally called "Personal Home Page" and intended to only slightly extend the functionality of Server-Side Includes. People tend to forget that.
That comment is extremely insightful. How did I not see this?
> It was originally called "Personal Home Page"
I was originally 19 inches long and crapped my diaper several times a day. PHP has grown and changed tremendously since those days. It's not the same codebase, at all: "Finding PHP/FI 2.0 still inefficient and lacking features they needed to power an eCommerce application they were developing for a university project, Andi Gutmans and Zeev Suraski of Tel Aviv, Israel, began yet another complete rewrite of the underlying parser in 1997.".
It certainly feels strange that this sort of comment is being defended when the same comment with PHP replaced by Python/Ruby/(Java/Coffee)script/Haskell/C/C++ would be universally reviled.
It's quite telling that we don't see comments like that for other languages that often, if ever. Aside from perhaps JavaScript, no other mainstream programming language causes experienced programmers so much grief. No other language is so riddled with obvious deficiencies, and so problematic.
Even if you did speak for everyone who'd used PHP before, I don't think this comment is in any way useful or productive - are we all just supposed to take it on faith that every person who has a strong negative opinion on something speaks for everyone who's familiar with the topic? It seems to me that this is precisely against the spirit of HN (and reasoned discussion in general). So yes, I think that if you're going to make a comment like "PHP needs to die" and want to contribute something meaningful to the discussion, you're expected to elaborate on why you think that way. It's surprising to me that you're even trying to say otherwise.
I'm not sure what to make of your assertion that the existence of a vocal group of PHP haters indicates that "PHP needs to die". I'll admit the language has its warts, but the hatred directed at PHP on HN seems way out of proportion to any other programming community I've been to, and out of proportion to the actual deficiencies with the language. And I don't really think that it makes sense to call PHP a "cancer" or to say that the existence of PHP is a problem; it's not as if we shun and shame programmers when they try to migrate from PHP to other languages, and it's not as if PHP paradigms are "infiltrating" other languages.
The comment added nothing to the discussion, and was still useless. I'm aware of the drawbacks of PHP. I look forward to a day when I'm no longer using it on a daily basis. But Tichy's comment added nothing to this discussion.
Is it not a valid opinion to sometimes say it is time for a thing to die? Why keep investing in hopeless tech?
Because your codebase relies on it.
Death will be hard for any mainstream language (proof: COBOL), especially open source ones.
It might find not many new projects are started in it.
Anyway, don't bother - I'll let you own your little PHP discussion now, moving on. My comments on HN won't stop the calamity anyway.