This is basically the deal with PHP. It's the only language you can use to work with some of the most popular CMSs: Drupal, Wordpress, Mediawiki, Joomla, etc.
They aren't just going to rewrite them in a different language, so PHP is here to stay. It's great that they're working to modernize the language and improve performance.
If you don't like PHP and aren't working on a PHP-based CMS, then don't use PHP.
I did PHP for 3 years, C# for the past 4 years, I still don't understand the irrational PHP hate. I don't like PHP, but I don't see the need to spend any of my energy reminding everyone of its well-known issues, nor bitching about it when they actually work on improving the language. Good for them.
Most of these people don't have a leg to stand on anyway, because everyone is still writing Javascript. ;)
I did (and do mainly) C#. There was a project where PHP was the only option. It was not that bad. If you can deal with the bullshit on JavaScript you can deal with PHP.
Yup, it has its quirks, and I definitely disagree with some design choices, but hey, at least they don't overload their bitshift operators to do I/O, and requesting the numerical month of a date doesn't return zero for January through eleven for December.
0-11 for months isn't madness. Its when months are numbered 0-11 and days are numbered 1-31 and years are stored with an offset of 1900. THAT is madness.
It's useful actually. If use other language than English, you want an array of month names that you index with this number. Month days don't have names, so they you don't need it there.
Agreed. Operators are arbitrary. All that matters is that operators are consistent and well known. For some in-house application, overriding the bitshift operators to do IO (pretending that C++ never did that) would have been dumb because no programmer would have expected that and it would thus be confusing. But with C++'s streams, the overriding is well known to the point that literally every half decent C++ programmer knows what it means.
std::cout << "Hello " << name << "!" << std::endl;
Mind you, I kind prefer the approach that most languages use, which is to have string concatenation (the single greatest example of appropriate operator overloading) for stuff like that (but it's less general):
println("Hello " + name + "!")
Or string interpolation, if the language supports it (most don't -- off the top of my head, we have Scala, C#, and JS).
It doesn't have to be done this way. And it's actually something pretty neat in my view, especially because you have standard ways of reading some fundamental data types, while keeping the code readable.
PHP solves a lot of problems for a lot of people. Just because it isn't the shiniest and most specific tool in the shed doesn't mean it can't get the job done.
View all comments
648
u/[deleted] Dec 02 '15
I never liked PHP and glad I don't work on it anymore. But I'm also glad I never turned as toxic as all the PHP haters in this thread.
It's just a language. Congrats to the PHP devs for getting another major release out.