> Most developers who hate PHP hate it out of elitism or ignorance. Either way it’s dumb. You have to choose a technology based on what you need. PHP is highly useful and powerful in many scenarios. And taking it out of the equation just because of its reputation is not a good idea.
When I conduct hiring interviews, one of the questions I like to ask regardless of the language for the position, is the developer opinion on PHP.
It's not uncommon for some to start massive rant based on outdated or outright wrong statements about PHP. Most of them never even used PHP.
It's a nice question to filter out elitists. The best candidates usually answer either "can't say because I have never used PHP" or state pros and cons of PHP based on their experience.
edit: quick -3 downvotes. I suspect I hit a nerve in some elitists who would not get that Rust or Haskell position because they would have baselessly trashtalked PHP in my interviews.
PHP always struck me as a language that had very haphazard beginnings and initial design considerations that continue to cause it problems, but less so as time goes one, that has made mostly good and well thought out decisions since then (and possibly because of that).
The base language functions are a train wreck of multiple functions doing similar things that could easily be handled through a few slightly more flexible functions (e.g. the numerous array specific functions), and there's little consistency between types and orders of arguments in the base functions of the language, but the class and object system seemed very sane and easy to work with as of somewhere in the 5.x timeline, especially compared to Python and Perl. I haven't used it much since about 2011, but I imagine it's better since then, not worse.
> It's not uncommon for some to start massive rant based on outdated or outright wrong facts about PHP. Most of them never even used PHP. It's a nice question to filter out elitists.
Even with all I said above, I think you might also be filtering out some people with a little bit of PTSD instead of elitists (but that might not be a bad thing for hiring). A lot of people started with PHP and might have moved to other languages when they became upset with some of it's real deficiencies, when those deficiencies composed a larger portion of the language then they do now.
There's a world of difference between starting a new project in a language using newer features and libraries in that language and maintaining some monstrosity from a decade or more ago, which some of these people may have been caught up in.
I'm a Perl developer myself, and when I have to work on 10-20 year old Perl code (or new projects where I feel we haven't adapted to all the newer things we could so we're forced into paradigms that are dated), it can feel very painful and disheartening, like you're standing in place and the world is moving around you. Too much bleeding edge is bad from a reliability standpoint, but too much stagnation is bad from a developer mindset standpoint. Both have their own business costs.
PHP has its pros and cons. A big pro is definitively job security: learn it now, learn it well and you'll have work for quite a long time. Composer is a pretty sane package manager, there are tons of frameworks and libraries out there to do nearly anything you can imagine, and also it's surprisingly fast. I'll even forgive the operator weirdness-- one big pain point that remains for me is how debugging PHP code is done.
That said, after dealing with JavaScript and its inane ecosystem has made me appreciate all the ways in which PHP has improved over the years, although that's probably not the kind of answer you'd be looking for. :P
> It's not uncommon for some to start massive rant based on outdated or outright wrong statements about PHP.
If they make wrong statements, I agree, they shouldn't do that.
If they make outdated statements... well, what would you expect from someone who used PHP in the past and then stopped using it? Do you expect people to stay up-to-date on a language they no longer use? If so, why, and can you think of reasons they wouldn't?
Did PHP ever decide whether NULL < -1 or NULL == 0? I want to hire people who care about correctness, and insanity like that really should bother them.
its fun to trash talk PHP who cares if statements are accurate. PHP sucks because of the dollar signs everywhere. From a distance Wordpress code looks like Nigerian Prince emails.
And crazy coding conventions like mysql_real_escape_string. Really PHP?
I think there's something people miss when looking at PHP as a system - the fact that it's a collection of hot swappable logic modules (pages)
PHP pages themselves can download packages of additional PHP pages and extend functionality as the website runs. For example the user can install a message board from the UI in WordPress, and PHP files themselves will download additional PHP files needed for a message board, and boom your site now has a message board - no recompile, install, or deploy. Your running system has extended itself in real-time with additional functionality.
Maybe I'm crazy, but I think there is something special about this that our typical compile/deployed applications aren't designed for.
Before the web, applications tended to carry their state in memory, but with the web we stored state in the database. Our logic really only needs to take the request from the user and either pull or modify data from the database and return. A lot of web apps today feel hollow as we rarely store state in them, we just pull, manipulate, and render database data. What if each major code path was its own binary? That's kind of like what PHP is.
With PHP the application is almost living as it is never really turned off/on, just modified over time. If there's a bug in one page, I just need to fix that one page. And a single page is lightning fast to deploy to my servers. The rest of the system keeps humming.
Now the language itself might not be the best, but do you see how this system is fundamentally different from single binary web applications?
There was a tech talk I saw on Youtube a few years ago that I really liked that argued that Facebook succeeded because of PHP, not despite it.
IIRC, the main argument was that despite its flaws, PHP has one killer feature, which is that it lets you have really tight iteration loops for web development. This made developing in PHP extremely productive.
I searched around for the video, but couldn't find it.
I know it's cool to hate PHP but I can think of other languages (Perl, VB6, Groovy) I dislike more. For a language to be so hated it has to be used a lot, and that's the primary virtue of PHP: it runs damn-near everywhere. Not only web scripting/apps but you can use it for shell scripting, Lambda/Azure Functions... there are even frameworks for creating native mobile applications with PHP. And I wouldn't be surprised if it compiles to JavaScript as well.
> For a language to be so hated it has to be used a lot, and that's the primary virtue of PHP: it runs damn-near everywhere.
“Runs damn-near everywhere” is true of nearly all contemporary scripting languages, though, no? It’s definitely used a lot, though I don’t know how that compares to Perl, Ruby, Python... Without digging in harder, I still think it came at about the right time and had a killer feature: a dynamic nascent web with an incredibly low barrier to entry. You could create a form and ask for a persons name and have it respond “Hello, $name!”. I feel like it got entrenched and never gave that up.
Yeah, I think that goes back to something the OP said, which is that it's a victim of its own success. It's old enough that everyone has had a bad experience with it. I've had many that are directly or indirectly tied to PHP - my college blog was a hodgepodge of unmaintainable PHP scripts, I've run Wordpress blogs with plugins that broke in horrible and confusing ways, some things like argument order and operator precedence are confusing.
Combine with a long-enough life to have some famous bugs (like the hash collision DOS attack), and you have a recipe for widespread derision.
But it kept getting better. I work in PHP at my day job, and I enjoy it. Tools like PhpStorm and Phan make the experience excellent. If PHP 7.4 were launched today as "AWSLang", a stateless object-oriented optionally-typed scripting language that seems designed for working with Lambda functions, we'd love it. "You mean it just dies at the end of the request by default? No shared mutable state between requests? How functional!" Sure, we'd have a few things to complain about. But don't we always?
That "article" spent half its time leading up to explaining why PHP is bad and half its height on GIANT MEMES. The actual content was half a paragraph about how PHP lacks strong conformity... needless waste of bits
I thought it was entertaining had a good bit of history. It does a good job of empathizing with the reader and then shedding light on why they might want to change their opinions on PHP.
Agreed, the author might have a good point but I really dislike this style of writing where I have to scroll through a few megabytes of animated image macros to get to the point.
> PHP is the most widely used language in the world for websites.
Being served does not equate to being used to develop new things.
Is there really that many new websites, website features being authored in PHP? Sure there is maintenance work and some popular platforms are written in it. But beyond that? I haven't seen a job posting in long time.
I write very little PHP but I work on a PHP extension written in C for a security product that integrates tightly with the language and some of the reasons I hate it are:
The Zend APIs suck, and they have non-existent or severely outdated docs. For example, one of PHP's main internal data structure, zend_hash, is a weird hash table with a string / int union key type and is awkward to access or iterate over.
Memory issues. I've had to debug segfaults caused by memory bugs in the language and core libs more than once. For example I hit an uninitialized read error in mbstring, it's been in their bug tracker since 5.x and never fixed. I understand the normal way to deal with memory errors in PHP is to shrug it off because processes are short-lived but if you are security-conscious it is concerning.
Compared to that, working on similar integrations for Python, Java, Node.js, the number of times I've hit such bugs is exactly zero. PHP just seems to have lower quality and worse design overall.
EDIT:
CVE database agrees with my assessment, so many more memory issues in PHP:
I don't mind PHP (like I don't mind lots of things that I don't really have to deal with), but Hack is by far my favorite web language. It has most of what's nice about PHP (specifically, reload and your changes are there, memory is request-scoped, etc.), without most of what's awful (the HSL fixes most of the goofy inconsistencies, real (although still not as expressive as I'd like it to be) static typing, etc.).
I "hate" my experiences in the aughts debugging other peoples PHP code, which put me off. But I primarily use JS now, and I feel like it's just as hated (but maybe more loved?). But I can't imagine how much people would hate JS if node came out in 2001, could you even?
I wonder what people would think of Node if it came out right before the tech bubble burst and the company hosting all the package repositories sank without a trace, taking the packages with it. That would have done some lasting damage to the web development world.
pick a random language, ruby, python, javascript etc etc and you'll find similar rants/complaints. Yet I think right now it's cool to shoot on PHP therefore everyone is more vocal
For a few years now I have been using PHP as a thin-client UI layer on top of C# Web API (dotnet core) projects running on Ubuntu/Docker. In my experience this has worked out very well, and has been easy to separate the areas of responsibility between Software Engineers and Designers.
All of our sophistication and unit tests live inside the C# back-end projects. While the PHP in the UI layer is limited to very simple code like for loops and templating; otherwise they're mostly design projects centered around HTML/CSS/UI/UX. Keeping it so simple makes it rather easy for designers to pick up on and work with.
I started a small website to document this pattern:
The article is correct in stating that PHP has moved quite a bit in the last ~10 years; even back when I was using PHP in the 5.1/5.2/5.3 days things were already steadily improving.
But ... that doesn't mean that PHP is a good language, or that people hate in PHP "just because it's cool". There are still many issues that remain. For example the very loose typing checking remains an issue and source of real bugs; e.g. a while ago a SAML library could be bypassed because it forgot to add the flag to in_array() to enable strict comparisons.
Much of the problems in PHP are with the standard library, and this is not easy to fix. Even the mysql deprecation (in favour of mysqli/PDO) took ages. I wrote a thing looking at fopen() in PHP a while ago, and I think it's a good example of the problems that remain in PHP: https://www.arp242.net/php-fopen-is-broken.html
There are still many issues with the standard library like this which are clumsy and just plain design errors, and many of them are too fundamental to work around or fix. Has PHP evolved? Sure, and that's great! But that doesn't mean it's now an especially good language. In general, I'd rather have a poor language with a good standard library than a good language with a poor standard library.
Aside: one weird thing about PHP's stdlib is that it's all written in C; I don't know any other comparable language where all of the standard library is written in C. I think this seriously hamper's the evolution of PHP's stdlib to a more modern experience.
There is no easy fix for any of this btw, because a revamping of the stdlib would likely lead to a "Python 3 scenario", so I don't blame the PHP devs for not fixing it (although I do blame them for introducing new flawed parts to the stdlib, like the whole DateTime fiasco), but that doesn't mean it's not a problem.
I don't like having to hold 'shift' while pressing '4' all the time. Other then that I don't think the language is bad and where you cannot do what you're needing to do. If only I could get rid of the need for $ signs everywhere.
I will say this for PHP: Its interaction with my brain had such a nearly-disastrous impact on my life, that it finally allowed me to finally get the mental health treatment I'd been seeking for a decade, and to realize the fundamental and unfixable weakness of my marriage.
If you enjoy eating pad Thai, that is great for you. I do too. But different people are different and the effect of peanuts on some people are quite dramatic yet real.
Choosing not to work with PHP is no more elitist than choosing not to eat gluten or peanuts.
I'm a PHP developer and I really don't like this language. Right now it's paying my bills but I hope my next job won't be related to it. People are saying that PHP has become better and that's very true. But still far behind modern languages like Go, Python, Rust, Elixir.
PHP is full of inconsistency, legacy code, and missing features. Core developers are doing great by adding a lot of new stuff and optimizations, but caring too much about backward combability disturbs the language from becoming better IMO.
I'm still not entirely sure why, in plain 2020, PHP seems to be the only language missing a debugger able to run in a shell.
Python, Ruby, Javascript and others have a "debugger;" statement of some sort that, when hit by the execution flow, will pause the code and let you type stuff in your shell, letting you inspect the code, step forward, etc...
Why does PHP need me to configure an entire IDE or my browser? (I'm looking at you, xdebug). Why can't it have a cli-debugger?
> Most developers who hate PHP hate it out of elitism or ignorance.
I don't think I'm an elitist. I inherited a system that was written by a pretty bright guy without a lot of programming experience: thousand-line files mixing logic and presentation, that sort of thing. It was a bear to maintain, it was a bear and a half to secure. It gave me a distaste for PHP, yes.
I don't hate PHP, I'd just rather use something else.
> Developers hate PHP because you are more likely to get errors with a language that allows so much freedom.
Ruby gives you much more freedom than PHP. You can reopen classes, you can use any kind of object as a key in an associative array, you can write code that will execute when the class (not the instance) is being created. And yet I find it much easier to write stable code in Ruby.
> Developers hate PHP because it is the opposite of hype driven development
Does C# gets so much hate? Or Python? I don't think either of them is an example of hype driven development, and yet they are rather respected languages that don't get so much hate.
> Developers hate PHP because they believe the language has been stagnating for 20 years.
Again, I don't think that's it. I've been using PHP7 for the last few months and yes, it is different from PHP4. You have optional static typing, you have better tools, a lot has changed. Yet deep in its core the language is still badly designed. I constantly find some weird behaviours that just don't exist in other languages.
In every other language I've used, such function would return [2,4], but not in PHP.
array_merge(
[ "a" => "w", "1" => "x" ],
[ "a" => "y", "1" => "z" ]
)
In every other language I know, it would return [ "a" => "y", "1" => "z" ], but PHP returns [ "a" => "y", 0 => "x", 1 => "z" ]
I know, these are just random examples and every language has its quirks. The problem is that in PHP there are so many quirks I keep checking how each function works, because after half a year I still can't remember them (and I don't remember whether array is a first or a second argument, because it depends on a function).
I wouldn't say that I hate PHP. It's another tool that I know and am able to use. I just think in 2020 in most cases when you start writing a new web application, there are plenty of better options. So maybe that's where the hate comes from? That there are simply many more consistent languages that just remain less popular than PHP?
[+] [-] hu3|5 years ago|reply
When I conduct hiring interviews, one of the questions I like to ask regardless of the language for the position, is the developer opinion on PHP.
It's not uncommon for some to start massive rant based on outdated or outright wrong statements about PHP. Most of them never even used PHP.
It's a nice question to filter out elitists. The best candidates usually answer either "can't say because I have never used PHP" or state pros and cons of PHP based on their experience.
edit: quick -3 downvotes. I suspect I hit a nerve in some elitists who would not get that Rust or Haskell position because they would have baselessly trashtalked PHP in my interviews.
[+] [-] kbenson|5 years ago|reply
The base language functions are a train wreck of multiple functions doing similar things that could easily be handled through a few slightly more flexible functions (e.g. the numerous array specific functions), and there's little consistency between types and orders of arguments in the base functions of the language, but the class and object system seemed very sane and easy to work with as of somewhere in the 5.x timeline, especially compared to Python and Perl. I haven't used it much since about 2011, but I imagine it's better since then, not worse.
> It's not uncommon for some to start massive rant based on outdated or outright wrong facts about PHP. Most of them never even used PHP. It's a nice question to filter out elitists.
Even with all I said above, I think you might also be filtering out some people with a little bit of PTSD instead of elitists (but that might not be a bad thing for hiring). A lot of people started with PHP and might have moved to other languages when they became upset with some of it's real deficiencies, when those deficiencies composed a larger portion of the language then they do now.
There's a world of difference between starting a new project in a language using newer features and libraries in that language and maintaining some monstrosity from a decade or more ago, which some of these people may have been caught up in.
I'm a Perl developer myself, and when I have to work on 10-20 year old Perl code (or new projects where I feel we haven't adapted to all the newer things we could so we're forced into paradigms that are dated), it can feel very painful and disheartening, like you're standing in place and the world is moving around you. Too much bleeding edge is bad from a reliability standpoint, but too much stagnation is bad from a developer mindset standpoint. Both have their own business costs.
[+] [-] kemonocode|5 years ago|reply
That said, after dealing with JavaScript and its inane ecosystem has made me appreciate all the ways in which PHP has improved over the years, although that's probably not the kind of answer you'd be looking for. :P
[+] [-] msla|5 years ago|reply
If they make wrong statements, I agree, they shouldn't do that.
If they make outdated statements... well, what would you expect from someone who used PHP in the past and then stopped using it? Do you expect people to stay up-to-date on a language they no longer use? If so, why, and can you think of reasons they wouldn't?
[+] [-] winrid|5 years ago|reply
[+] [-] erik_seaberg|5 years ago|reply
[+] [-] eggsnbacon1|5 years ago|reply
And crazy coding conventions like mysql_real_escape_string. Really PHP?
[+] [-] trixie_|5 years ago|reply
PHP pages themselves can download packages of additional PHP pages and extend functionality as the website runs. For example the user can install a message board from the UI in WordPress, and PHP files themselves will download additional PHP files needed for a message board, and boom your site now has a message board - no recompile, install, or deploy. Your running system has extended itself in real-time with additional functionality.
Maybe I'm crazy, but I think there is something special about this that our typical compile/deployed applications aren't designed for.
Before the web, applications tended to carry their state in memory, but with the web we stored state in the database. Our logic really only needs to take the request from the user and either pull or modify data from the database and return. A lot of web apps today feel hollow as we rarely store state in them, we just pull, manipulate, and render database data. What if each major code path was its own binary? That's kind of like what PHP is.
With PHP the application is almost living as it is never really turned off/on, just modified over time. If there's a bug in one page, I just need to fix that one page. And a single page is lightning fast to deploy to my servers. The rest of the system keeps humming.
Now the language itself might not be the best, but do you see how this system is fundamentally different from single binary web applications?
[+] [-] kkwteh|5 years ago|reply
IIRC, the main argument was that despite its flaws, PHP has one killer feature, which is that it lets you have really tight iteration loops for web development. This made developing in PHP extremely productive.
I searched around for the video, but couldn't find it.
[+] [-] type0|5 years ago|reply
[+] [-] mikece|5 years ago|reply
[+] [-] bch|5 years ago|reply
“Runs damn-near everywhere” is true of nearly all contemporary scripting languages, though, no? It’s definitely used a lot, though I don’t know how that compares to Perl, Ruby, Python... Without digging in harder, I still think it came at about the right time and had a killer feature: a dynamic nascent web with an incredibly low barrier to entry. You could create a form and ask for a persons name and have it respond “Hello, $name!”. I feel like it got entrenched and never gave that up.
[+] [-] jakevoytko|5 years ago|reply
Combine with a long-enough life to have some famous bugs (like the hash collision DOS attack), and you have a recipe for widespread derision.
But it kept getting better. I work in PHP at my day job, and I enjoy it. Tools like PhpStorm and Phan make the experience excellent. If PHP 7.4 were launched today as "AWSLang", a stateless object-oriented optionally-typed scripting language that seems designed for working with Lambda functions, we'd love it. "You mean it just dies at the end of the request by default? No shared mutable state between requests? How functional!" Sure, we'd have a few things to complain about. But don't we always?
[+] [-] GenerocUsername|5 years ago|reply
[+] [-] d1str0|5 years ago|reply
[+] [-] enlyth|5 years ago|reply
These memes are always forced and never funny.
[+] [-] smacktoward|5 years ago|reply
[+] [-] njharman|5 years ago|reply
> PHP is the most widely used language in the world for websites.
Being served does not equate to being used to develop new things.
Is there really that many new websites, website features being authored in PHP? Sure there is maintenance work and some popular platforms are written in it. But beyond that? I haven't seen a job posting in long time.
[+] [-] greenshackle2|5 years ago|reply
The Zend APIs suck, and they have non-existent or severely outdated docs. For example, one of PHP's main internal data structure, zend_hash, is a weird hash table with a string / int union key type and is awkward to access or iterate over.
Memory issues. I've had to debug segfaults caused by memory bugs in the language and core libs more than once. For example I hit an uninitialized read error in mbstring, it's been in their bug tracker since 5.x and never fixed. I understand the normal way to deal with memory errors in PHP is to shrug it off because processes are short-lived but if you are security-conscious it is concerning.
Compared to that, working on similar integrations for Python, Java, Node.js, the number of times I've hit such bugs is exactly zero. PHP just seems to have lower quality and worse design overall.
EDIT:
CVE database agrees with my assessment, so many more memory issues in PHP:
PHP: https://www.cvedetails.com/product/128/PHP-PHP.html?vendor_i...
Python: https://www.cvedetails.com/product/18230/Python-Python.html?...
Java: https://www.cvedetails.com/product/19117/Oracle-JRE.html?ven...
[+] [-] timw4mail|5 years ago|reply
[+] [-] seccess|5 years ago|reply
"Facebook, Wikipedia, Yahoo, Flickr, Tumblr all these sites run in PHP and welcome millions of users every month without flinching."
Facebook dropped PHP for their own language called Hack, which I think is based on PHP but with a lot of the things people complain about changed.
[+] [-] biesnecker|5 years ago|reply
[+] [-] basch|5 years ago|reply
[+] [-] egwynn|5 years ago|reply
[+] [-] mgkimsal|5 years ago|reply
and some of those things have changed in base PHP as well too.
[+] [-] werber|5 years ago|reply
[+] [-] msla|5 years ago|reply
[+] [-] triceratops|5 years ago|reply
[+] [-] 0xCMP|5 years ago|reply
It's a footgun waiting to happen as you switch between PHP and other languages.
[+] [-] thinkindie|5 years ago|reply
[+] [-] benharrison|5 years ago|reply
All of our sophistication and unit tests live inside the C# back-end projects. While the PHP in the UI layer is limited to very simple code like for loops and templating; otherwise they're mostly design projects centered around HTML/CSS/UI/UX. Keeping it so simple makes it rather easy for designers to pick up on and work with.
I started a small website to document this pattern:
http://rapstack.io
I have advocated for its use on most of my projects, but obviously the mere mention of PHP stirs up a lot of knee-jerk reactions.
[+] [-] Carpetsmoker|5 years ago|reply
But ... that doesn't mean that PHP is a good language, or that people hate in PHP "just because it's cool". There are still many issues that remain. For example the very loose typing checking remains an issue and source of real bugs; e.g. a while ago a SAML library could be bypassed because it forgot to add the flag to in_array() to enable strict comparisons.
Much of the problems in PHP are with the standard library, and this is not easy to fix. Even the mysql deprecation (in favour of mysqli/PDO) took ages. I wrote a thing looking at fopen() in PHP a while ago, and I think it's a good example of the problems that remain in PHP: https://www.arp242.net/php-fopen-is-broken.html
There are still many issues with the standard library like this which are clumsy and just plain design errors, and many of them are too fundamental to work around or fix. Has PHP evolved? Sure, and that's great! But that doesn't mean it's now an especially good language. In general, I'd rather have a poor language with a good standard library than a good language with a poor standard library.
Aside: one weird thing about PHP's stdlib is that it's all written in C; I don't know any other comparable language where all of the standard library is written in C. I think this seriously hamper's the evolution of PHP's stdlib to a more modern experience.
There is no easy fix for any of this btw, because a revamping of the stdlib would likely lead to a "Python 3 scenario", so I don't blame the PHP devs for not fixing it (although I do blame them for introducing new flawed parts to the stdlib, like the whole DateTime fiasco), but that doesn't mean it's not a problem.
[+] [-] abellerose|5 years ago|reply
[+] [-] csours|5 years ago|reply
(Disclaimer - The last time I used PHP was over a decade ago, and the last time I used C was in college)
[+] [-] greenshackle2|5 years ago|reply
[+] [-] afarrell|5 years ago|reply
-------------------------------------------------------
If you enjoy eating pad Thai, that is great for you. I do too. But different people are different and the effect of peanuts on some people are quite dramatic yet real.
Choosing not to work with PHP is no more elitist than choosing not to eat gluten or peanuts.
[+] [-] d1str0|5 years ago|reply
[+] [-] iillexial|5 years ago|reply
[+] [-] alexandernst|5 years ago|reply
Python, Ruby, Javascript and others have a "debugger;" statement of some sort that, when hit by the execution flow, will pause the code and let you type stuff in your shell, letting you inspect the code, step forward, etc...
Why does PHP need me to configure an entire IDE or my browser? (I'm looking at you, xdebug). Why can't it have a cli-debugger?
[+] [-] cafard|5 years ago|reply
I don't think I'm an elitist. I inherited a system that was written by a pretty bright guy without a lot of programming experience: thousand-line files mixing logic and presentation, that sort of thing. It was a bear to maintain, it was a bear and a half to secure. It gave me a distaste for PHP, yes.
I don't hate PHP, I'd just rather use something else.
[+] [-] type0|5 years ago|reply
But in this case he is terribly ill and not actually dancing but having a condition called Chorea that is often mistaken for dance like movements
https://en.wikipedia.org/wiki/Chorea
[+] [-] arnvald|5 years ago|reply
Ruby gives you much more freedom than PHP. You can reopen classes, you can use any kind of object as a key in an associative array, you can write code that will execute when the class (not the instance) is being created. And yet I find it much easier to write stable code in Ruby.
> Developers hate PHP because it is the opposite of hype driven development
Does C# gets so much hate? Or Python? I don't think either of them is an example of hype driven development, and yet they are rather respected languages that don't get so much hate.
> Developers hate PHP because they believe the language has been stagnating for 20 years.
Again, I don't think that's it. I've been using PHP7 for the last few months and yes, it is different from PHP4. You have optional static typing, you have better tools, a lot has changed. Yet deep in its core the language is still badly designed. I constantly find some weird behaviours that just don't exist in other languages.
Example:
In every other language I've used, such function would return [2,4], but not in PHP. In every other language I know, it would return [ "a" => "y", "1" => "z" ], but PHP returns [ "a" => "y", 0 => "x", 1 => "z" ]I know, these are just random examples and every language has its quirks. The problem is that in PHP there are so many quirks I keep checking how each function works, because after half a year I still can't remember them (and I don't remember whether array is a first or a second argument, because it depends on a function).
I wouldn't say that I hate PHP. It's another tool that I know and am able to use. I just think in 2020 in most cases when you start writing a new web application, there are plenty of better options. So maybe that's where the hate comes from? That there are simply many more consistent languages that just remain less popular than PHP?
[+] [-] thinkindie|5 years ago|reply
what's the problem with array_filter then? That keys are not reindexed?