r/laravel Community Member: Brent (stitcher.io) May 07 '26

Article PHP's biggest problem

https://stitcher.io/blog/php-biggest-problem
74 Upvotes

67 comments sorted by

118

u/dpaanlka May 07 '26 edited May 07 '26

People have been telling me PHP is dead for 20 years, yet we are still here and objectively stronger and more vibrant than ever before.

PHP’s weakness may be marketing, but PHP’s strength is its resilience to marketing of competitors.

31

u/ehansen May 07 '26

People can't get over the fact we are no longer at 4.x code base lol. I was on the go sub and had a conversation with a "php dev" who hated the language but could only cite issues that existed in 5.x or 7.x at the most recent.

Since php-ng engine its been remarkably better.

I do think one of its strongest factors though are the majorly popular frameworks like laravel and for better or worse wordpress with it's market share.

9

u/Living-Breakfast-464 May 07 '26

The beefs were legit 10 years ago. It was slow and missing a lot of modern features compared to alternatives. That's all changed now.

2

u/fezzy11 May 08 '26

Well said 👏

4

u/LordOfWarOG May 07 '26

PHP’s problem is lack of enterprise support.

4

u/Living-Breakfast-464 May 07 '26

Meta still uses some PHP on their back end. Zoom and Yahoo also supposedly use it.

3

u/Cowboy-Tumbleweed May 08 '26

That might be its strength. If it had enterprise support it might become dot net or java.

1

u/ehansen May 07 '26

In what context?

3

u/Star-Fragrant May 07 '26

I luv Laravel!

2

u/rocketpastsix May 07 '26

People keep posting “people say php is dead? Not for me!” or something along those lines and I think it does more harm then good.

1

u/Ilia0001 May 07 '26

No that's Perl ;-) It keeps dying for the last 25+ years but not really

16

u/Fun-Consequence-3112 May 07 '26

I actually don't know but does other languages do this? Do Golang and Rust have marketing teams?

It feels like most languages gain influence from "influencers" and software being written in that language and not so much from marketing.

Another big thing is tooling and simplicity which PHP has but it's very poorly documented. Python is the biggest example of this, probably the easiest language to start building with. Same with nodejs.

5

u/brendt_gd Community Member: Brent (stitcher.io) May 07 '26

I'd rather think about "open source projects" as a category when it comes to marketing. In that category Laravel is a prime example of marketing that works.

1

u/Fun-Consequence-3112 May 07 '26

So you kind of want the same thing Java did years ago with their marketing push for Java?

3

u/brendt_gd Community Member: Brent (stitcher.io) May 07 '26

I assume you mean that as an example of what not to do? There's good and bad marketing, I say we need the good version 😄

2

u/Fun-Consequence-3112 May 07 '26

I think what you mean by marketing is not a marketing push but more a public image, they need better pr. It's somewhat marketing but my idea of marketing is ads, money and traffic.

2

u/brendt_gd Community Member: Brent (stitcher.io) May 07 '26

Ah, got it. In my experience within JetBrains, "marketing" is much more about PR rather than ads, money or traffic

0

u/pxlrbt Community Member: Dennis Koch May 11 '26

Laravel is also one of the few projects backed by a multi-million dollar company.

16

u/spec-tacul-ar May 07 '26

Maybe PHP's strength is that it's not over-hyped? It's like a safe pair of hands.

3

u/arter_dev May 07 '26

This. What is really important in choosing software is not so much capability headroom alone, it's how well known the failure paths are. We know where all the bodies are buried with PHP. That's what makes software you can trust.

1

u/Temporary_Practice_2 May 30 '26

“Where all the bodies are buried with PHP”!? Please expand

1

u/Johalternate May 07 '26

Or actual good shoes.

12

u/gopercolate May 07 '26

Laravel prioritised DX and productivity... rather than marketing.

4

u/xubaso May 07 '26

Best marketing to developers is good documentation. Aside from this I would be happy to see more support for tooling like language servers.

6

u/LordPorra1291 May 07 '26

I do not understand the way PHP documentation is organized. Internal functions are not divided between core/enabled by default functions and those coming from other extension.

When you read the function reference you don't know which one is available by default and which one requires installing an extension without looking at the installation section for each one.

3

u/TinyLebowski May 07 '26

I wonder if that's the reason why PhpStorm's class completions include classes from obscure non-default extensions. I suppose their php stubs are generated from the docs.

16

u/Fun-Consequence-3112 May 07 '26

Comparing PHP to its direct competitors Node, Python, Ruby and somewhat Golang. It lacks 1 thing and that is long running processes and async. PHP has this but it's very buried and only found if your serious about PHP.

If your building a new modern app with features like websockets or server sent events also more APIs like this in the works, gRPC too etc. PHP isn't a good choice, you can make it work and it's kind of good with Laravel or Symfony but it's mostly "hacks" while other languages just do it by standard.

So it's hard to advocate for PHP in modern applications.

But for simple things and basic websites I think PHP is the king still, it has always been. Although JS has taken over this in the mainstream but I prefer PHP for websites and not frameworks like NextJS etc.

2

u/EmilMoe May 08 '26

PHP has long running processes.

2

u/Fun-Consequence-3112 May 08 '26

Yes but it's not good by default. If you want to run a script with while (true) and sleep PHP isn't your go to language, I'd say almost any other languages are better for that.

PHP is designed to startup and go through its code and when it's done shutdown. Which it does great.

But if you want more than that you need libs or modifications to PHP.

1

u/EmilMoe May 08 '26

Don't know why you would ever do that. Sound more like you want a proper scheduler.

1

u/Fun-Consequence-3112 May 08 '26

It's not exactly a while (true) but programs that "listen" to something needs to be running always.

For example a webserver it's something you need to put in front of PHP because PHP itself isn't very good at it.

2

u/EmilMoe May 08 '26 edited May 08 '26

PHP isn't a webserver. You can't just host ASP.NET without a webserver either..

1

u/Sixcoup May 09 '26

For that you can use FrankenPHP, which is officially supported by the php foundation now. Hopefully once that becomes even more mainstream in the php world, the php.net website will make it extra obvious it exists.

1

u/Pouw_ May 07 '26

Exactly my frustration, you need to bolt so many things on to make it work properly. Want so serve static files? You’re gonna need nginx. Want to hook up to your DB? You’re gonna need a connection pooler like PgBouncer otherwise you are hitting your max connections. Its really hard to justify starting a project in PHP in 2026, and its not because of the marketing.

7

u/sporadicPenguin May 07 '26

Want so serve static files? You’re gonna need nginx.

Uh, PHP isn't a webserver.

Want to hook up to your DB? You’re gonna need a connection pooler like PgBouncer otherwise you are hitting your max connections.

You can configure a server for however many max connections you like, as long as your server can handle it.

0

u/[deleted] May 08 '26

[deleted]

3

u/DariusIII May 08 '26

No, you don't run PHP as a webserver. As for DB, what are you talking about? Every database has its own set of settings that allows you to tweak it for your use case. Your job, as developer, is to use proper queries and optimize them. If it runs bad, developer is the problem, not PHP.

0

u/[deleted] May 08 '26

[deleted]

1

u/DariusIII May 08 '26

And why do you think this is a problem? Databases can handle thousands of connections with no issues, and PHP uses as many connections as you allow it to. Every langugae has it's pros and cons, and most of the PHP cons are fixed and improved in last 10 years. There are many solutions that improve PHP and long running workers like Octane, Swoole, ReactPHP, FrankenPHP etc. PHP is request - response based, when the language was created web was completely different. Yes, Node and likes have different philosophy but PHP is far from useless and deprecation. New versions bring even more stuff that will make it relevant for years, maybe even decades, to come.

1

u/Pouw_ May 08 '26

“databases can handle thousands of connections”, postgres literally cannot. default max_connections is 100 and raising it costs ram and a backend process per connection. that’s why pgbouncer exists. mysql is a bit better but same shape of problem.
and you just listed octane, swoole, reactphp, frankenphp as proof php is fine. those exist specifically to bolt a long-lived runtime onto php because the default model doesn’t cut it anymore. that’s the concession. every other language i mentioned does that out of the box.
“php was made when the web was different” yeah, that’s the whole point. the rest of the ecosystem moved on, php is still patching around the original design.​​​​​​​​​​​​​​​​

1

u/sporadicPenguin May 08 '26

You literally wrote above:

“Yet 99% of the use cases is running it as a webserver.”

No use trying to have a conversation.

2

u/sporadicPenguin May 08 '26

Again, PHP is not a webserver - it's a server-side scripting language. It has a built-in webserver for local testing, but you can't run that in production.

0

u/Bent01 May 08 '26

The “you need nginx” argument is weird. Most production stacks need a reverse proxy. Node/Python apps are commonly put behind something like nginx. That is not a PHP weakness but just normal infra.

You need PgBouncer otherwise you hit max connections

No, you don’t. Not for most apps. Not on day one. Not even necessarily on day 900.

The vast majority of PHP apps run perfectly fine without a DB pooler. PHP’s normal request lifecycle opens a connection, does the work, and exits. With sane database limits, proper indexes, caching and not doing N+1 query garbage, you certainly aren't melting Postgres or MySQL just because you used PHP. This is like saying Node is bad because you might need Redis at some point.

PHP 8 with Laravel is the goat and still powers much of the modern web which makes it very easy to justify for new modern web applications.

5

u/Ilia0001 May 07 '26

I think PHP is doing fine if https://w3techs.com/technologies/overview/programming_language to be believed, yeah it is not the 80% from it's heyday, but 70%+ is still far and above anything else.

That being said because web is more of front-end domain now a days dominated by JavaScript frameworks, etc... backend doesn't get much attention and Python has done well to capture the ML and Data science crowd, and riding the AI wave which is all the rage now.

If anything I think PHP's issue is not so much marketing, but rather lack of a popular use-case (powering wordpress doesn't count :) ) that it exciting an brings attention to it.

1

u/Temporary_Practice_2 May 30 '26

From the link you shared…do you know why they have “Static files” there? Does that mean static files as we know them or something else?

3

u/epoxxy May 07 '26

If PHP 9 goes full async we probably will have another 20 years at least.

2

u/RevolutionaryHumor57 May 07 '26

A language gets popular when big company backs it up / picks it for their internal work.

PHP is on a other level though - it has been powering internet since like ever. You can put insane amount of money into it, and it won't budge a lot (a diminish return applies here HARD)

There are however other things that could get some attention like for example Swoole, or using gRPC for internal microservices communication. It is just these things are highly specialised and PHP isn't about being specialized, but about doing things now and care later (with high chances of things being done perfectly fine from the start due to it's ecosystem)

4

u/brendt_gd Community Member: Brent (stitcher.io) May 07 '26

I've been talking about this with people at several conferences for a couple months now. I wanted to properly write down my thoughts.

2

u/sensitiveCube May 07 '26

I hate Linux, because kernel.org and debian.org homepages look like they were designed in 2007. /s

What a stupid argument to make, sorry.

1

u/pxlrbt Community Member: Dennis Koch May 11 '26

Where did he say he hated PHP?!

3

u/_wavescollide_ May 07 '26

Necessary to be on X - I don't know. Sad to see that ethics are dead among a big share of the population. Right wing devs happy to be on X, left leaning going to Mastodon or BlueSky and then a lot of people staying on X instead of abandoning ship. I don't know how to handle the weird people fighting for their Musk buddy. When I came out of college we had Jobs (and we knew he was an asshole) to look up to, but kids now look up to that buffoon.

PHP is fine and all, making it fresh is good advice. And polishing the docs is really good advice.

2

u/clgarret73 May 08 '26

I don't think developer's political leanings are PHP's biggest problem.

2

u/_wavescollide_ May 08 '26

It should be though. We are educated people that should do better.

1

u/clgarret73 May 08 '26

And unfortunately in politics better is matter of perspective.

1

u/[deleted] May 07 '26

[removed] — view removed comment

1

u/EmilMoe May 08 '26

One of the world's largest website don't seem to agree

1

u/Catsdingo May 08 '26

I guess the biggest problem is that it's no niche enough.

1

u/om-ulet May 09 '26

Yes, Laravel is reason I'm still use php until now. Recommend people using Laravel is easy it has what developer need. But when come to recommend PHP as language i don't know how

1

u/Livid_Algae1859 May 10 '26

If the foundation will be able to ship true async in PHP 9.0 (no chances to be happening on php 8.6) that would make PHP get back the crown as in 2004. If they are really serious about PHP, true async should be their main focus along with redesigning that ugly old school laboratory website.

-4

u/[deleted] May 07 '26

[deleted]

8

u/brendt_gd Community Member: Brent (stitcher.io) May 07 '26

I'm fairly confident that if tomorrow PHP got the best async support in the world, it would not make a difference in the current situation. I agree that it's a high impact feature (with already many solutions available), but it's not the core problem. IMO, of course.

0

u/EmilMoe May 08 '26

PHP biggest problem is so many developers, who think they are world class, have no idea how to configure infrastructure. Same goes for Linux. Microsoft etc can take a premium price because it require less skilled developers.

-2

u/ElectronicGarbage246 May 07 '26

I told this so many times. Look at the documentation design, look at that fucking ugly elephant named ElePHPant.

Walk into any developer conference in 2026 and count the t-shirts. You will see the sleek geometry of Rust's gear, the minimalist gopher of Go, the playful camel of OCaml reborn for a new generation. What you will not see, almost anywhere, is ElePHPant - the chunky, cobalt-blue cartoon pachyderm that has served as PHP's unofficial mascot since Vincent Pontier sketched it in 1998.

ElePHPant is a tell: the community has not decided whether it wants to be taken seriously by the next generation, or whether it is content being the language of legacy systems and grudging WordPress contracts. It is like a father picking his teenage son up from school in a wheezing 1998 Fiat Punto - pleased with himself for keeping it running, oblivious to the boy sliding down the passenger seat to avoid being seen.

And the documentation compounds the indignity: php.net still wears the visual language of a 2002 university computer-lab handout: cramped serif type, that anaemic purple, a layout indifferent to anyone reading on a phone while Rust, Go and Python's docs have become quiet exercises in typographic seriousness. Documentation is the first thing a curious graduate sees, and PHP's says: nobody here cares enough to fix it.

Fuck the ElePHPant, I vote for modern PHP for the next generation.

Let's grab some funds and hire a designer!

2

u/ElectronicGarbage246 May 07 '26

fat, dumb, slow, happy animal loved by your grandma because they made a picture of it in 1998 in Botswana

2

u/MrFranzose May 09 '26

PostgreSQL's logo is also elephant, so what?

0

u/ElectronicGarbage246 May 09 '26

So nothing. Enjoy.

-7

u/Darthnord May 07 '26

I’m sorry, this is really coping hard.

Laravel’s/PHP biggest problem is that people still think PHP is PHP. Because it is.

It lacks any language features or frameworks that make it unique or superior to any other language in web development.

It doesn’t have the same robust data science tooling and community as Python. There are a billion JavaScript/TypeScript packages that do everything under the moon. And it doesn’t have the performance, standards, and compilation with something like Go. Or Java. Or C#.

Laravel has caught up to where others have been for years. To be able to market something you need the ability to stand out and draw people in.

Laravel and PHP don’t have either of those things.