2 ms·
I work mostly in PHP for my day job, and honestly even I can understand people being dismissive of PHP. It undeniably has many advantages you and others mention
by rob74 5y ago
I work mostly in PHP for my day job, and honestly even I can understand people being dismissive of PHP. It undeniably has many advantages you and others mentioned, but equally undeniably it was from the very beginning a huge kludge (famously, its creator only intended today's "PHP language" as a template language, and when its scope gradually grew to a "full-fledged" language, nobody really cared about consistency). And this is a legacy which they have since tried their best to shake off, but they will of course never be able to get rid of it completely.
Also, same as many other open source languages, there seems to be a tendency to pick up every language extension someone proposes hoping that it might win over some developers, but I'm not really convinced. Does PHP really need a "match" control structure (https://www.php.net/manual/en/control-structures.match.php https://www.php.net/manual/en/control-structures.match.php) when it already has good ol' "switch" and "if/else"? Of course, I also like the more flexible (Pascal/)Go-style switch statement better than the "classic" C-style one, but maybe they should have given it some more thought years ago instead of slavishly following C/C++ then and inconveniencing thousands of developers by introducing a new keyword now?