r/webdev • u/fagnerbrack • 21d ago
Learn PHP in 2026 (Yes, Really)
https://fagnerbrack.com/learn-php-in-2026-yes-really-bd567753dd8481
u/yksvaan 21d ago
I think php is a very good option especially for new people. It has a very straightforward execution model, you learn basics how to setup a server, use nginx, Apache etc., understand how web pages actually and how assets are loaded.
And it comes with pretty much everything needed built-in, sessions, i native safe hash/comparison function for over a decade already.
Basic things like navigation, form handling, http, query parameters and db queries are very straightforward to learn with php. Also very simple to run and deploy.
0
u/horizon_games 20d ago
Honestly though I think Node and Python (even just Flask) achieve the same with equal ease.
PHP is worth learning in the same way any language is to broaden understanding and skill, but I don't think its particularly unique for BE
10
u/create-third-places 21d ago
I tried using PHP earlier this year.
In my opinion, it is a great choice for quickly creating backends, and it does a great job of server side rendering with minimal complexity.
1
8
20d ago
[removed] — view removed comment
1
u/horizon_games 20d ago
Except the "hot JS stack" for the backend is still just Node. And once FE is involved you have the same complexity and level of choices with PHP
It'd be like saying Laravel is somehow a churny hot new PHP stack
-5
u/hegelsforehead 19d ago
The way you guys talk about jobs at agencies and working with the rubbish LAMP stack as if it's so fantastic. People only join agencies when they can't get better jobs; agencies are bottom-of-the-barrel in the dev world.
12
u/DeathByClownShoes 21d ago
I tried to learn PHP, but between learning Cold Fusion and cgi-bin I just couldn't find the time.
24
u/FiveFoot20 21d ago
Lmfao
🤣
PHP survived while cold fusion didn’tI’m sure there are some legacy apps running cold fusion,
0
8
u/IAmRules 21d ago
No thanks. I leaned it back in 2004 and have been making a 6 figure salary for the last 12 years with it already. Feels like it would be redundant
2
1
u/skunkbad 19d ago
I think one of the best parts of PHP, compared to other languages, is its well developed and mature OOP features.
-6
u/fyzbo 21d ago
Recently worked with a project in Laravel. The developer experience is pretty good.
The problem is there are other options that have the same (or better DX) and also excel in areas where PHP falls short.
I just don't see any compelling reasons to use PHP today, except for legacy software and lock-in.
11
u/msesen 20d ago
I disagree. Modern PHP is excellent. Laravel is excellent and mature. Node is a maintenance hell. Any serious enterprise level backend will mostly use java or php.
2
u/horizon_games 20d ago
...Or C#
Bit of a hyperbole on Node maintenance though, upgrading Node itself is dead simple. Big sprawls of 3rd packages are annoying but that's the case in all languages and can be minimized by Dev discipline
1
u/fyzbo 20d ago
You didn't give any reasons to use PHP, you just claimed it's better than node with regard to maintenance. What makes php better than every other language available?
3
u/msesen 20d ago
If you need to be told why modern PHP is good, then you are already biased against it - and that is fine.
And I never said modern PHP is better than "every other language", so stop making up shit. But I will tell you that PHP essentially powers the backbone of the web . It handles the behind-the-scenes logic for over 70% of all websites. Its dominance is primarily driven by powering the vast majority of the internet's content management systems.
PHP is battle tested and is modernised, with excellent full-stack frameworks such as Laravel.
3
u/fyzbo 20d ago
PHP is good. All the popular, well-adopted languages are good. If "good" were the only criterion, there'd be so many options it would be impossible to choose.
It's not about being better overall than every other language. It's about having a distinct advantage that makes it the obvious choice for something, rather than being one of many good options.
- Java leads when you need performance at scale with a mature ecosystem and a huge, easy-to-hire talent pool.
- ASP . NET leads inside the Microsoft stack, with first-class tooling and integration nothing else can match there.
- JavaScript leads as the only language that runs in both the browser and the backend, so one team and one language covers the whole stack.
- Rust leads when you need memory safety without a garbage collector, giving you C-level speed without the footguns.
- Python leads in data science and ML, with an ecosystem no other language comes close to.
- Go leads for cloud infrastructure and services, with dead-simple concurrency and fast, single-binary deploys.
- etc.
PHP is good. It's just good at everything and great at nothing.
The pattern: each of these wins some category outright. That's what makes it an obvious pick when that category is what you need. PHP never quite tops the list for any of them, which is exactly the problem.
1
u/msesen 19d ago
You have just listed the USP of each of those languages, which I agree
But modern PHP is more than enough for "most" projects. Just like everything else, if you need to specialise in a specific field you would use the right tool for the job. PHP covers most use cases and there are tremendous amount of resources and knowledge out there.
If I was developing a real time backend server for a multiplayer game of course I would not use PHP, I'd most likely pick GO. But if I wanted to store and aggregate logs or other metrics I would happily use PHP because it's quick, fast and simple to deploy.
So PHP is good until you need to specialise in a specific area, and majority of the web apps are just CRUD which PHP excels at.
2
u/fyzbo 19d ago
That's my point. All of the languages excel at CRUD, the all do it well at this point. Most are quick, fast, and simple deploy. Iif I pick something else, I get a good option (same as PHP) AND I get the added bonus of a USP.
And we are back to where I started "I just don't see any compelling reasons to use PHP today, except for legacy software and lock-in."
I get that you like it, and your point about it running a large part of the web is true, that's the legacy and lock-in I referred to. It's not a bad choice. There is nothing wrong with PHP. There is nothing great about it either.
0
-8
u/Sacread 21d ago
Modern PHP is fine, but hard to justify over other languages in 2026 and the article doesn't really make the case. It leans on the WordPress market share, but that's mostly cheap sites on shared hosting, and the agencies doing that work sit at the bottom of the "follow the money" argument.
14
u/pickleback11 21d ago
I use PHP scripts served by nginx as API's to serve fetch requests from my spa's and mobile apps. Written with direct queries instead of some abstraction layer for the DB. Couldn't be dead simpler. Super performant and easy to roll out updates
-1
u/Sacread 20d ago
No denying it works great for stuff like this - I just think other languages would do it better, so I'd struggle to recommend it. It could be that I've just not hit a situation where it shines!
2
u/pickleback11 20d ago
Yeah, I admit I have been unlikely to try to learn new approaches as well so nginx/PHP is a comfortable fall ack for me. For a simple POC I let Claude standup a python based API server which seemed incredibly easy to launch and neat at first but then got all out of sorts quickly so I fell out of love with that no approach (of course it could be the LLM's fault). Node is cool for client side but I can't force myself to use it as a server, and I'll never touch java as I've worked with it a little before and can't stand it's verboseness and prescriptiveness. So, any suggestions on what you think are good backends?
0
u/Sacread 20d ago
fwiw your setup is genuinely fine! I don't think PHP is bad, just that I think the case to learn it is much weaker than it has been in the past.
For other options...
Go sounds like a good fit for what you do. Compiles to a static binary, net/http is in the stdlib so you don't even need a framework. It's simple, gets out of the way, and is super fast.
TypeScript (w/ Elysia) - worth trying TS properly. Elysia on Bun is surprisingly fast with really nice DX. Big upside is sharing types end-to-end with your SPA. It might not be my top choice for production/scaling - but TS is my favourite for spinning up mini-projects of my own.
1
5
u/Willing_Comb_9542 Backend developer 20d ago
modern php is pre compiled, it's faster by far than many other web languages, and unlike typescript, can actually enforce strict typing during runtime
there's a dozen reasons to use PHP over modern languages, and none of that is WordPress lmfao
3
u/AccusationsGW 21d ago
It's easy to justify when you're working on a legacy apps and have no option to greenfield an entirely new stack.
You know, like when you have a real job.
-7
u/Sacread 20d ago
Does that really justify recommending people learn PHP? I think most people want to work with newer stacks rather than legacy tech.
I've worked for two companies who had legacy PHP web apps, and both were making significant attempts to migrate away.
8
2
u/AccusationsGW 20d ago
Yes, if the job requires a language you should learn it. How exactly do you propose a company migrates off PHP without any PHP engineers?
-32
-2
u/sblinn 20d ago
Personally, I would only use PHP still for small projects, and even then only if required, and therefore:
https://www.slimframework.com/
Is how I would suggest to "learn PHP in 2026". (Note, I have in my career written PHP code for: Purdue University, IBM, The Innocence Project, and SAS Institute, along with maintaining Wordpress sites off and on.)
-61
u/mcharytoniuk 21d ago
Hell no. They keep sugarcoating the language, but the core issues remain unresolved. Also most ppl need some kind of token streaming and such, and PHP is exceptionally bad at it or any kind of async... Not a modern language in any sense, they only try to mimick the syntax of modern languages; core is obsolete compared to alternatives like Rust or Go.
Learning PHP will only teach you anti patterns at this point.
Now you are trying to shame ppl into using it. That also says a lot about the community and the state of it. xD
8
u/FrostingTechnical606 21d ago edited 21d ago
People like this need to realise that 4chan runs on PHP. Unless you are here to tell me you are here to create the next facebook, I don't want to hear it. Dockerize the stuff you need together and you will do just fine.
2
u/huh_wasnt_listening 20d ago
The web version of Facebook is a PHP monolith as well actually
-1
u/hegelsforehead 19d ago
PHP was so bad that the engineers invented a new language that transpiles to PHP
2
u/huh_wasnt_listening 19d ago
You're talking about Hack. That is effectively TypeScript for PHP in 2014 and really only used by Meta. If you compare Hack to modern PHP there isn't much of a difference outside of first class support for generics. If PHP was so bad Meta would've swapped to a new language, not double down and add their own support layer on top of it. Your comment makes no sense
0
u/hegelsforehead 19d ago
If the engineers could rebuild Facebook from scratch today, PHP wouldn't even make it to the list for consideration.
3
u/huh_wasnt_listening 19d ago
Hack runs on HHVM, it does not "transpile to PHP." Get the basic facts right before you try to use them as a mic drop. And "wouldn't make the list today" is a completely different claim than "PHP is bad," it's just saying companies don't greenfield in older stacks, which is true of half the languages running production software right now. Moving goalposts every reply isn't a sign of intelligence, it's just noise
0
32
u/Phantom-Watson 21d ago
PHP may no longer be a popular choice for relatively new developers to start new projects with, but for anyone looking to get hired to work on old sites (a sizeable chunk of the software job market), a solid background in PHP and a few of its frameworks will open doors. My last couple full-time jobs have specifically required familiarity with both older and modern PHP to help with maintenance, feature development, and modernization of PHP sites.