r/webdev • u/pineappletinis • 29d ago
Question How warranted is the PHP hate?
I feel like there has been a lot of hate on PHP, especially after the recent blowout regarding PHP vulnerabilities that even ended up on mainstream media. I even saw absolute non-techy people bringing up PHP and talking authoritatively about how "bad" and "old" it was lol. Not to mention the AI-shills saying one should just use Claude to create one owns CMS (!!). I am also aware that most PHP hate is usually misaligned hate intended for badly managed WordPress sites. And that some people just prefer other languages or love a hatetrain.
But one thing in particular that got to me was someone who mentioned that PHP has a page with vulnerabilities listed that go back 20 years and have yet to be patched. And that if you are a dev who is in any way interested in security within one's projects, you just don't use PHP at all. It was like having only a screen-door for your house with no locks. Do other languages have similar list of unsolved vulnerabilities? What makes them inherently more secure?
I dug around to find information about other popular programming languages and frameworks and it seems like at least right now, many are being found to have vulnerabilities due to AI being used to find them. React had a critical issue about a year ago, and Python earlier this year (although they did not blow up in the press like this).
Anyway, I would like to hear from people who use PHP regularly for work, beyond WordPress and who can maybe compare it to other languages/stacks as well. Please no low-effort replies from people who last used PHP 20 years ago or just don't like it, if possible.
View all comments
-1
u/vanderaj 29d ago
The problem with PHP is that folks who don't know how to code (before AI) end up coding in PHP. And it's horrifically bad at enforcing any form of type safety, security, or anything approaching modern web development architecture or security standards. MVC? Never heard of her. OWASP Top 10? What's that?
All that changed with AI. Adding a few key skills, Claude can create excellent Laravel and Symfony apps in next to no time, and you can ask it to secure the application properly. I'd recommend watching a few enthusiastic PHP YouTubers, and finding relevant AI skills, and you should be ok.
But hand-coding PHP? Yeah, nah, please don't.
Source: I've coded a PHP forum for 20+ years. PHP was my primary language at the time until I discovered Go and fell in love. Also, one of the co-leaders of the OWASP Top 10 for 10+ years. I recently had Claude rewrite my forum from scratch in Laravel and secure it. Modern AI is a game changer for PHP devs. Please don't hand code PHP.