Why so many people hate PHP?
Posted by AgitatedTip5613@reddit | learnprogramming | View on Reddit | 119 comments
I'm pretty new to web dev, only learned HTML/CSS and a little of JS. I found out that PHP got hated A LOT and i have no idea why. Now I don't know if i should learn PHP or not because in my countries many places teach and use PHP for backends.
commandblock@reddit
PHP is fine and it’s soooo much easier to make websites with PHP. But JavaScript is very popular right now
500ErrorPDX@reddit
I feel silly for hating on a language because it's just a tool to get the job done, and an experienced developer can work productively in any language given time to learn it, but man, PHP syntax looks so ugly.
I've got a PHP back end on my current work project. $ before variable names and -> operator for member access just look really ugly to me.
Awesome community and ecosystem, outstanding support for every problem I have encountered, tutorials for everything, but the syntax just feels gross
read_at_own_risk@reddit
The $ prefix for variables have grown on me, and I don't mind ->, but what I still hate after 10 years of PHP is . for string concatenation.
ShlimDiggity@reddit
I just wish double clicking on the variable name would also highlight the damn $ (for copy/paste purposes)
read_at_own_risk@reddit
VSCode? https://www.igorkromin.net/index.php/2018/04/12/make-visual-studio-code-to-correctly-select-php-variables-on-double-click/
SanguinarianPhoenix@reddit
(newbie here) What is the name for "quality of life improvements" that come in very helpful when learning VScode? Such as learning "ctrl + ~" to switch between the command line and source code window?
read_at_own_risk@reddit
Check out the Help menu in VSCode
SanguinarianPhoenix@reddit
will do, thank you!
read_at_own_risk@reddit
No idea, but don't be a cargo-culter. If they do the same thing, use what's easiest for you.
SanguinarianPhoenix@reddit
Cargo cult programming is a style of computer programming characterized by the ritual inclusion of code or program structures that serve no real purpose.
Does that mean I shouldn't include this at the bottom of my college projects?
I feel like I should do it every time since it may be important in the future.
ShlimDiggity@reddit
Yep! Wow, thanks for this.
Nomsfud@reddit
I like that it doesn't. It means I can replace the name quickly when I need to show my boss and my variable is initially named $myBossSucks
pharmacy_666@reddit
i don't really see how it's any uglier than c or java or anything else like that
deaddyfreddy@reddit
well, it's still a bit uglier
pharmacy_666@reddit
how
femio@reddit
Associative arrays
pharmacy_666@reddit
ok, that's not syntax
femio@reddit
I am referring to the syntax they use.
pharmacy_666@reddit
this is ugly?
again, how's that any different from the standard languages that have this syntax?
deaddyfreddy@reddit
then why there are some many major languages that do the job bad?
Arthesia@reddit
Conversely I love it coming from Java/C type languages.
femio@reddit
It's the associative arrays for me, I just can't stand them (even though I work with Laravel)
WingZeroCoder@reddit
While most of my preferences against PHP could be considered pedantic, the fact that PHP combines its numeric list type with its dictionary type in the form of associative arrays is, IMO, a genuinely bad design choice that’s seemingly forever baked into the language.
It has caused, and continues to cause, many bugs and encourages many poor choices all the way down the stack.
For as much as I love Laravel, this is an area even Laravel offers little to help offset (Model Collections notwithstanding).
EdwardElric69@reddit
Can't you access shit with class notation
ConfidentCollege5653@reddit
Indeed it's just a tool, but some tools are better than others.
buzzon@reddit
Still better than Perl
leetnewb2@reddit
One thing I haven't seen mentioned yet - php does not have a major corporate sponsor. Go, JS, TS, Java, .NET, Python, Kotlin, Rust, C++, Swift, Objective C are each sponsored by one or more more of the following companies: Microsoft, Google, Oracle, Meta, Apple, and Nvidia. You can understand the logic governing these companies supporting certain languages.
When you have that much tech resources and hiring power at play over a long period of time, it will shape the market, ecosystems, and opinions. Meanwhile, php's widespread adoption predated how modern hosting and technology stacks work. When you can accomplish backend/API stuff in virtually all of those other, well-supported languages today, it gets harder to justify starting a new project in php. Even if you find php to be your favorite, is it worth devoting time and effort into learning if the jobs aren't there and the future is uncertain?
Personally, as someone that isn't ever looking to work in programming, I like the idea of a language that is more community driven.
ThyringerBratwurst@reddit
Even though PHP has developed "for the better", I personally don't like the syntax at all: method calls with ->, namespaces with \ instead of correcting old design errors and changing the context operator to use dots for methods and namespaces...
Then there are no real import options; and PHP is still lagging behind when it comes to concurrency.
I wouldn't recommend PHP except for medium-sized websites.
stefannsasori@reddit
"there are no real import options"
What do you mean? Give an example and I'll show you how we do that in PHP
Electronic_Part_5931@reddit
With latest PhP versions (8+), aside from the syntax, I can assure you that you would see no difference with Java (a part from being compiled) or Python for example.
PhP has now strong typed properties, clearer syntax, weird yet useful annotation system, and even very cool syntax if you are experimented enough to use the latest good practices of coding.
Anyone hating PhP is because they are used to. Projects written in php 4/5 were absolutely UGGLY, thus PhP almost stopped existing at that point (the project was almost off, PhP6 was about to end the story, which actually never released) but they managed to bring it up again with PhP7, and now with PHP 8 it became a true programmation language with wonderful OOP concepts.
If all those marketers trying to sell you formations on the latest python virtual env or Next.js bullshit were really honest, no one would argue PHP is, and will remain, one of the absolute best web programmation language for a good amount of time.
DataPastor@reddit
Because only few know, that PHP was originally only an exchange DSL between C++ programmers and graphics designers, and originally never intended to be a standalone programming language. However, its author made it “too good” for the purpose, and people started to use it as a standalone languge. But because as a standalone language it obviously had some flaws, also it had a low entry barrier (meaning: it was super good for the original purpose), many script kiddies like me jumped on the topic and lots of spaghetti codes were created. This was irritating for folks who had a proper education (meaning: trained on Algol60, Cobol and C) and they started to blame PHP. And haters gonna hate. Software is a pop culture.
Revolutionary-Yak371@reddit
Because of depricated commands in every new version of that language.
Some commands are depricated, while some is totally with new syntax and parameters.
For instance "mysqli" vs old "mysql".
You must always update your PHP to the latest version, while updating and testing your code as well.
timwaaagh@reddit
It's good at what it does but it has major issues if your codebase expands. Debugging remains an issue. Now that's not technically a problem of the language but it is your problem if you want to use it. Other than this, dollars all over the place isn't amazing either.
hipnaba@reddit
You're reading the wrong material. No reasonable developer "hates" on languages. It's just young newbies making noise. Php is getting better and better.
There are people here "hating" on pieces of syntax, such as the concatenation operator. Does that sound reasonable to you?
AmSoMad@reddit
I don't think anyone's mentioned this yet:
Because of PHP's history, starting out as a scripting language, adding features until it grew until a full language, maintaining backwards compatibility, and advancing to a modern language - it's left with a lot of really messy syntax, and to a greater extent, an extremely high number of proper nouns. Lots of distinct words for doing distinct things, with very little conformity across them, even for things that are similar.
For example:
strtolower() and ucwords() are both string functions, but one starts with "str" and the word starts with "uc". array_push() and count() are both array functions, but one starts with "array_" and the other doesn't. date_create() and strtotime(), inconsistent time function naming. Certain functions have their arguments ordered differently, such as strpos($where_to_search, $what_to_search) and array_search($what_to_search, $where_to_search). Some functions using different casing formats, etc.
So even though it's become a powerful language, it's one of the messiest, with a lot of discreet names you need to remember. A lot of people hate JS - and anyone who hates JS should take a look at PHP.
In addition to that, JS emerged as the dominant language for the web. PHP was huge in 2003, around when WordPress first came out. But by 2009, when Node started letting us write server-side JS, JS rapidly rose to prominence. Now we have Chrome's V8 engine, Apple's JavaScriptCore, Node, Bun, Deno.
DINNERTIME_CUNT@reddit
ucwords() could’ve been named better, but it isn’t the reverse of strtolower(), that would be strtoupper(). ucwords() just capitalises the first character of each word.
AmSoMad@reddit
I'm not comparing opposites, just how same category if functions have different names.
For string functions alone you have:
in JS they're all:
And PHP shares this characteristic across every category of functions/"methods". It's basically the result of taking something that was never meant to be a ful language, and turning it into a full language. Everything is retrofitted, and it's resulted in a very messy, inconsistent language. Which, for me, increases the cognitive load when trying to program. I still use Laravel from time to time, but I prefer the JS/TS frameworks.
DINNERTIME_CUNT@reddit
Yeah it could definitely have done with some better planning.
SanguinarianPhoenix@reddit
https://youtu.be/KYp2xWcRWYQ?t=158
Tech with Tim mentions this toward the end of this video.
deaddyfreddy@reddit
why don't have both?
akoOfIxtall@reddit
I don't hate it, just looks archaic, funny looking syntax, and the good tutorial is from ages ago using XAMP, I don't feel like reading documentation for PHP...
Fall_To_Light@reddit
Weird syntax, that's all. I can't really give up on it though because of Laravel.
dave8271@reddit
A couple of legitimate reasons (primarily, the inconsistency of the global function namespace covered in the top comment) mixed with a lot of ignorance of how the language, the engine and the ecosystem have changed over the last decade. Checkout Symfony https://symfony.com if you want to see what good PHP looks like.
Maximum-Counter7687@reddit
its fire and the simplest way to solo fullstack for a beginner nowadays.
barni9789@reddit
I don't hate PHP I'm just unsure why would you use it. Ofc if you have WordPress/Drupal then I can get it, but why would you use symphony or Laravel or vanilla php? There aren't any worse candidates In the mainstream
I don't know pho can do that the followings can't? as I see:
JS: Better ecosystem, async, faster, easier C#(.net) Better ecosystem, async, multi threaded, much faster, better syntax Java: Better ecosystem, multi threaded, much faster, better syntax (can async if needed) Python: Better ecosystem, easier
Wonderful_Device312@reddit
I hate PHP but I recently had to maintain some old PHP code and I've got to admit that it's really good at what it does. I think it's problem is that it was designed from the ground up to be the best at a very specific thing and then once it hit the real world they had to start supporting a lot of other things and those things are very tacked on and poorly implemented.
Other languages meanwhile are much better at general purpose stuff and keep trying to implement web frameworks that make them as good at web stuff as PHP is.
deaddyfreddy@reddit
shows a bad languages design? sure!
well, not really, it's just happened
Wonderful_Device312@reddit
Poor design is still a design. Their design just didn't consider anything long term or beyond the specific problem they were trying to solve at the time.
tappthis@reddit
because it's horrible compared to other options.... the unique sintax is a disadvantage, the ecosystem is notoriously prone to being exploitable, instlaling packages or making the app run isn't as straight forward as other languages...
Vntoflex@reddit
Can you mention better options, I’m new to
tappthis@reddit
if you want a dynamic scripting language, go for either python with django or node.js with express.
if you want a compiled one go for .Net with C#
All 3 of them have jobs everywhere with a vastly superior experience
Even java with spring, golang, and ruby on rails have better experience
Vntoflex@reddit
Thank you so much
tappthis@reddit
a php dev disliked me lol, In my experience they try to stop any changes because they arent a commnity known for learning outside their govmnt/contractor bubble. They barely have any reasons for using it other than "this is what I know and what is already being used here"
Just take a look of unicorn startups, the vast majority don't want to use PHP (not really even meta, they even tried to make "Hack" a thing)
They ALL use Python, Node.js, Java, .Net and/or Go . Some might still use Ruby.
Other tech is fine for smaller things, or for smaller shops with teams that know each other personally...
Vntoflex@reddit
Yea got it thanks :)
tappthis@reddit
but JS really has no equal: everything for web ends up being JS or compiled into it. It's also very important on backend too.
JS can be used in an entirely functional way, unlike python, java, ruby or c#, which are mostly OOP, or functional methods.
Vntoflex@reddit
For web dev i know that for front end I need HTML, css and jss and some frame work like react. Also found react interesting because I can algo get into react native to create apps.
My question is for back end webs the most popular are js and node.js right ?
barni9789@reddit
most popular might be hard to define. It's more likely a question about most popular in what area. Node js is very popular nevertheless and it's 100% worth learning esp if you are a frontend dev.
node has some unique things and unique challenges. one could be the lack of standard libraries and standard tools. with nodejs backend you usually will want to use a framework. most popular is express and you will have to bring your own tooling in the system or set it up yourself. No standard ORM no standard authentication etc...
I myself would try to learn at least later an enterprise OOP language/tool too like, C# .NET
tappthis@reddit
if you're still exploring what you like and dislike, and have no interest in OSes or embedded, JS is THE way to go.
Vntoflex@reddit
Ok tysm
tappthis@reddit
stay in a major language/framework until you get all of the basics really solid, and you'll get a job in no time
Vntoflex@reddit
Alll rights thanks
spellenspelen@reddit
Don't listen to him. PHP is just fine for most projects. It gets slow if your code base grows to much but it's no where near as bad as people make it out to be. It USED to be bad. But than newer versions came out.
Extension_Anybody150@reddit
Maybe it didn't work for them but PHP is still very relevant and useful, it has improved a lot over the years, and it's still widely used.
tnnrk@reddit
Learn whatever has a job market near you. Don’t listen to these idiot nerds needlessly bashing a programming language they probably never used.
deaddyfreddy@reddit
why learn programming at all then?
tnnrk@reddit
How did you land there from my comment? Be conscious of what the job market is like near you and what programming languages are more in demand near you…
deaddyfreddy@reddit
well, in most places there are lot more non-programming jobs, I suppose
deaddyfreddy@reddit
if you all you want is to get a job in your country - learn PHP. Otherwise - don't, it sucks shit.
mzalewski@reddit
It’s a social thing. People hate on PHP mainly for the same reason they are hating on Jira and Teams. What they really mean to say is “look, I am part of the same group”.
That’s not to say that PHP bad reputation is completely unjustified. There are strictly technical reasons to prefer something else. But there are also technical and business requirements that make PHP the best choice in specific case.
imagei@reddit
Other than working with a legacy codebase, what can be a technical justification for picking php over literally anything else in 2024? I’m asking about a technical justification, because team knowledge may play a role of course as well.
leetnewb2@reddit
It is a carefully evolving language that is easy to learn, highly productive, has a strong ecosystem, and won't rip your face off like python2->3 or Scala2->3. The field is obviously crowded and there are plenty of good enough languages depending on the domain. But for something that php is suited for, particularly when paired with a framework like laravel or symfony, there is an argument to be made.
deaddyfreddy@reddit
Clojure has been there for 17 years and like 99% of the code written for 1.0 is still working today
Hopeful-Sir-2018@reddit
Many moons and seasons ago - before PHP 7, there was PHP5 (6 doesn't exist and no I'm not joking). Everything before 5 is... well... dog shit.
There's two main reasons it's dog shit. One is it wasn't structured very well and tended to create shit code. Two is... it was the "only" language anyone could pick up and fuck with for free. The main alternative was Coldfusion at the time, something a former boss of mine still gets his dick hard over for some reason. Because of this - every Tom, Dick, and Harry made websites that were... well... shit. They didn't know what they were doing and went with it anyways. So you tended to stumble upon shitty CVS repo's that were difficult to decipher or figure out - also because IDE's weren't very great in their support for PHP. Debugging was frustrating as well.
Fast forward some time - PHP7 is released and things change. But very few people went back to check in on it. The reputation stank and few cared to give it another go. To be fair - unless they have a reason to give it another go, their time might be better spend elsewhere (e.g. learning Rust, C#, Swift, Kotlin, etc)
Coincidentally near'ish around this time MySQL (the free version being MariaDb now) was losing favor and PostreSQL was gaining in popularity. Postgre's problems have been resolved that MySQL gapped them a decade prior, making the playing field equal and MySQL still having a bug that's old enough to drive (or is it vote? I don't remember) if it were a child.
In this case, regardless, PHP is not a bad language to learn and understand. Even if it's shit on - it's good to know it. All sorts of websites use it and you may want to hack on it later and being even mildly competent in it will be useful.
Another reason people tend not to like PHP is it's interpreted which can make debugging slightly spicier but that problem has since, mostly, been solved.
deaddyfreddy@reddit
definitely
not true, it's 1995, not 1965, remember? There were alternative ways to generate HTML from some programming language (do you remember Viaweb, for example?)
probably because PHP had bad syntax, both hard for parsers and people :)
again it's not the 2000s anymore, most websites don't
Economy_Vacation_761@reddit
Mainly because the alternatives are better. Java, Python, and C# all have great frameworks that get the job done, are strongly typed and the debugging and deployment are great.
PHP is the default programming language of most web projects, including things like WordPress, Drupal, etc.
So it's almost a requirement to be familiarized with PHP in order to maintain existing web projects. Most developers know some PHP and they also know that it has many flaws. Also, you know that popular things get a lot of hate.
In my personal opinion, frameworks like Laravel and Codeigniter are a pain to work with.
deaddyfreddy@reddit
sorry, can I take your time machine to go back to 2007?
NoHistorian4672@reddit
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
deaddyfreddy@reddit
said a guy who was pretty good at selling languages, not in their design, though
Draegan88@reddit
I’m currently working with it on some legacy php 7. What I hate about it is that it’s single threaded and has no async like js. Honestly it’s just like a crappier JavaScript and it looks ugly. I dunno if it’s like this in later php but what I’m working with objects are defined as key value arrays… it looks like trash. The $$$$ makes it kind of annoying too.
leetnewb2@reddit
Regarding async:
Reactphp has been around a long time - first releases were around 2012.
Draegan88@reddit
Thanks if I ever work with php again I’ll check it out. As for now this code base is 20 years old so nothing I can do about it now.
teraflop@reddit
Here is an article with a long list of bad or confusing design decisions that PHP has made: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
The article is 12 years old and some of the problems have been fixed, but not all of them, and the bad reputation remains.
ChezMere@reddit
Worth mentioning that PHP's peak in usage was years before this article came put, when NONE of these baffling design choices had been fixed.
spellenspelen@reddit
"some" he says. Dude it's like a whole new language now it doesn't even compare. What makes you think an blog from 12 YEARS ago is a indication of anything.
start_select@reddit
I don’t know if that’s a valid comparison.
I’m an iOS dev and I still use an iPhone 6 for development testing. The only reason it’s not my main phone is the battery died. It still does everything my other iPhones do. The only major change has been screen size and cameras in almost every iPhone model.
Bacon_Techie@reddit
That only makes the fact that not everything in that list is fixed even worse
GeorgeDir@reddit
This article is very interesting.
I want to add that many people hate PHP because it used to be the beginners entry point into web development. The same reason people now like to shit on JavaScript
dakrisis@reddit
They have always shat on JavaScript. Other languages offer ways to transpile/compile your code to JavaScript, saving respectable programmers from ever having to touch it.
maleldil@reddit
Another big issue was the lack of separation between presentation layer and backend code (in much the same way as old Java JSP/Servlet code, which is also much hated by Java devs nowadays). It's just so difficult to figure out what's going on where, and the fact that PHP is a dynamic language makes it even worse than with Java. I'm sure more modern frameworks like Laravel have solutions to these old issues, but for a lot of us the bad taste of bad, spaghetti code in PHP has never left our mouths.
illathon@reddit
You will find people who hate everything. Some things have good reasons some don't.
PHP for the most part is a simple language to use. It is perfectly tailored for web and makes starting a web server insanely easy.
waffleassembly@reddit
PHP stands for Hypertext Preprocessor. Which makes total sense to your evil twin with a goatee from Bizarro World
JohnJSal@reddit
Originally it was Personal Home Page.
homomorphisme@reddit
Aside from it being an admixture of different design decisions over the years, I think the primary reason people don't like PHP is that 1) it is highly ubiquitous, and 2) there is a metric fuckton of code written poorly in PHP. That means that eventually one might be forced to use it in bad codebases.
DINNERTIME_CUNT@reddit
Because sheep go where they’re told.
Mikiz@reddit
I don't know honestly. I feel like all the bad things people say about PHP could also be applied to NodeJS, and the people saying the bad things about PHP love NodeJS, so it doesn't make sense.
Temporary_Practice_2@reddit
You shouldn't fall into the bandwagon as a beginner. PHP is a beautiful and powerful web programming language. And there is no substitute! ...Most people who bash it aren't web programmers...If you love the web, you will love PHP.
armahillo@reddit
PHP is a fantastic language to start a web development journey.
If you go beyond and learn additional web and software principles, it can carry you farther than that.
josephjnk@reddit
Something to remember is that, because there are so many languages, the vast majority of developers don’t have first-hand experience with the vast majority of tools. PHP’s reputation is mostly due to people with little to no experience in the language.
I see a lot of people complaining about syntax in the comments here. Syntax complaints are a very surface-level complaint, and are usually what developers complain about when they don’t know enough to complain about anything deeper. I hear developers swear that OCaml’s syntax is the ugliest they’ve ever seen just as much as I hear OCaml developers say that they miss the syntax whenever they use a different language. Syntax only matters when it’s especially verbose or confusing; hating a language because it uses “$” a lot is an affectation. Just about anyone who programs extensively in a modern language will get used to that language’s syntax eventually.
What matters is a language’s semantics, ecosystem, and standard library. Like most older languages these were a mess in early versions of PHP. This was a valid reason for PHP to get a bad reputation, just like JavaScript did.
Modern versions of PHP clean up a lot of rough edges while still carrying baggage. Again, this is true of most languages that have been around for a long time. My understanding is that there’s work on adding some static typing to PHP, as well as Hack, which is a language based on PHP that Facebook developed. I’m not a PHP dev so I can’t attest to how good these are.
I would personally rather not use PHP for a new project; Scala and OCaml are more exciting to me, and TypeScript is what I’m good at. But I will almost certainly never be able to get a Scala or OCaml job and it’s important to be realistic about career prospects. Most importantly I’m not going to disrespect another developer’s knowledge and skills just because they use a language that doesn’t appeal to me.
start_select@reddit
Nodejs and c#/.net were created and matured while PHP was still trying to decide if it’s a templating language and if debugging was an important feature.
It was “easy” for people to write a 5 line PHP script and run it. So the field became completely overwhelmed by dangerous developers.
PHP is pretty alright today. There are good developers today. But the stain isn’t going away anytime soon.
It was easier to say “we aren’t doing PHP” and immediately eliminate 50% of undesirable candidates that won’t learn anything else.
Specialist-Phase-567@reddit
Because its popular to jump on hate bandwagons
WystanH@reddit
PHP is kind of a victim of its own success. It started out with the goal to be simple, originally Personal Home Page tools, something a novice programmer could use to spruce up their "Home Page."
It became very popular and more features were continuously added. Not all the new features were great. It's like a city busting outside of the original inner walls. While that's the fate of most general purpose languages, PHP kind of didn't start out with that in mind.
What's worse, for PHP, is that folks with very little programming experience made lots of cool things. And, well, lots of painful stuff that more experienced programmers occasionally have to maintain. And that, really, is an endless font of hate.
BewilderedAnus@reddit
Hating on PHP is unironically a team-building exercise. It's something most developers have in common.
tobesteve@reddit
Sounds like if new artists would be hating on Taylor Swift. Yes she's popular, yes she makes money, but but but, $!
underwatr_cheestrain@reddit
PHP has been fantastic for the past few years.
Anyone complaining otherwise is either uneducated in the topic or just a grifter of fool
AaronKClark@reddit
Once you know the basics of programming you should be able to jump back and forth between languages fairly easily. PHP was novel for it's time in that it was a far much easier langauge to use than perl, and it was geared to scripting and automation. Maybe people complain about python even though it is an order of magnitude better than php or perl was. Programmers will complain about the most trivial things all while making six figures in the comfort of their home in their underwear.
huuaaang@reddit
I go back to PHP 3 days and PHP was legit trash back then. And only existed because perl CGI was worse. So I'm traumatized by PHP 3-5. Since then I haven't had any need or desire to revisit it to test the claims that it is better now. I've moved on. There are far more interesting languages that I'd rather tinker with.
spellenspelen@reddit
Yeah it used to be, even tho you'l never use it again maybe you'l find the improvements still somewhat interesting: https://youtu.be/ZRV3pBuPxEQ?si=VYik5-6rE7PWSMy-
clearlight@reddit
Because it’s popular, haters gonna hate.
ToThePillory@reddit
I don't hate it, but I see no reason to use it again.
You don't have to hate a language to choose not to use it, there are so many languages out there that you can't learn all of them, so if something doesn't interest you, then you can probably just drop the idea of learning it.
If you like it, and can get a job in it, go for it, but it's not for everyone.
SeoCamo@reddit
Php is one of the easy languages to learn, one of the languages for the web.
OliB150@reddit
TIL PHP is widely hated! I’ve always quite liked it but I’ve never been a power user. The first language I ever used also had $ variables so it’s never stood out to me as particularly weird.
coolkid42069911@reddit
My main issue with php is that it lets people write bad code and doesn't really tell you how you should write code.
Conscious_Bank9484@reddit
All about the $
mxldevs@reddit
I learned PHP to build and maintain wordpress plugins and it's not a language that I particularly enjoy working with.
But I'm not sure how much of it is related to the way wordpress is designed.
fruszantej@reddit
$, fucking $
imagei@reddit
Personal take, don’t flame me for missing some technicality please 😅
PHP is the only language I flat out refuse to work with because it messes with my brain. Each time I worked with it for a couple of days and went back to a different language I found myself involuntarily using weird constructs, order of operations and other php-isms and then having to rework everything into clearer code. Idk, maybe I’m fragile or something but, while I have my preferences, it’s the only language that just feels wrong all around.
EdwardElric69@reddit
Goofy ass language $ -> /
femio@reddit
Because:
1) Dynamic scripting languages like PHP, JS always have pretentious haters
2) It gets a bad rap due to heavy use in Wordpress (an ecosystem with janky dev experience and a ton of security issues)
3) More subjectively, the syntax is a little weird and not that enjoyable to write (imo, take my opinion with a grain of salt but I'm not the only one who feels that way)
hellohennessy@reddit
It is hard, ugly and annoying. But many are forced to use it anyways.