September 3rd, 2024

PHP Is the Best Choice for Long‑Term Business

Tomas Votruba advocates for PHP as a stable, long-term business solution, highlighting its established frameworks, competitive innovation, and advanced tools that enhance code quality and adaptability for future changes.

Read original articleLink Icon
PHP Is the Best Choice for Long‑Term Business

Tomas Votruba argues that PHP is the best choice for long-term business development due to its stability, healthy competition, and robust ecosystem. He references a podcast with Pieter Levels, who emphasizes a technology stack that includes vanilla PHP, jQuery, and SQLite, highlighting the pitfalls of hype-driven development in the tech industry. Votruba points out that many popular JavaScript frameworks require frequent rewrites, which can be costly for businesses. In contrast, PHP frameworks like Symfony and Laravel have been around for years and continue to evolve, providing a reliable foundation for developers. The competition between these frameworks fosters innovation and offers businesses a choice, ensuring they can build sustainable solutions. Votruba also notes the advancements in PHP's core technology, such as the introduction of Abstract Syntax Tree (AST) and tools like PHPStan and Rector, which enhance code quality and facilitate upgrades. He concludes that while PHP may not have the fastest performance or the most modern syntax, its comprehensive ecosystem and open-source nature make it a practical choice for businesses looking to minimize long-term costs and adapt to future changes.

- PHP offers long-term stability with established frameworks like Symfony and Laravel.

- The competition between PHP frameworks drives innovation and provides businesses with options.

- Advanced tools in the PHP ecosystem, such as PHPStan and Rector, improve code quality and facilitate upgrades.

- PHP's open-source nature allows for adaptability in response to future changes.

- Hype-driven development in other languages can lead to costly rewrites, making PHP a more sustainable choice.

Link Icon 13 comments
By @mrinfinitiesx - 8 months
> ssh some@server

> There are 544384348946349783246237946349732647 npm packages that need updated.

> There are 548432782344434 critical npm packages.

It's all about what works. My crazy opinion is PHP makes a great CLI, so does nodejs. Node has amazing frameworks, PHP is battle-hardened back-end wise but front end you're coming back to JS. I honestly hate what the JS bloated internet has become and enjoy PHP, but I also enjoy javscript.

Tons of apps are already electron bloated stuff; JS is in.

Use what works and what isn't going to break.

Be mindful of JS CDNS and supply chain attacks.

Keep things up to date. Fix them if they break.

By @blackbrokkoli - 8 months
Strange article.

It's basically a list of nice things going for PHP, but you can write that for literally any tech in any context — like, I could argue that you should build web sites with the Unity game engine or raw Python by listing out-of-context stats all day long.

Whenever the author actually compares, it breaks down:

- Ok, so Lavarel is from 2011 — React is from 2013, Django is from 2005...so what

- Sure, there may be a new js framework everyday, but not a new version of js...and anyway, an active and innovative community is automatically bad why?

- PHP has "2 strong framework players" — ok, so has Python, js has two to four...

- "lack of advanced technology" — what does this even mean?

By @wifipunk - 8 months
Change my mind, but modern JS frameworks aren't just hype. They solve real problems for complex UIs. PHP's great for some stuff, but try building a snappy SPA with it.
By @JodieBenitez - 8 months
Poor article IMO, sounds like it has been written by an uninformed junior, except it's apparently not. And this line is unreal:

    "Last but not least, other languages lack advanced technology."
By @mikl - 8 months
This is essentially the COBOL argument. Sure, it might not be very good, but it’s long-term stable.

Fortunately, many other frameworks are long-term stable, but also have a good programming language behind them. Django, Ruby on Rails, and there are similar options in Java or C#.

As for the other points, sure, PHP might be the one language where there are exactly two strong web frameworks. But I don’t see the problem of there being 3 or 4. Django has plenty of competition that drives innovation – web2py, flask, etc.

And same for those other claims. All major languages have various kinds of code analysis tools. Most have healthy communities, etc.

By @darkotic - 8 months
I enjoy PHP. I've been using it for about 20 years. I enjoy writing in the language, most likely because I've gotten good with it. It is my preferred tool for creating things and solving problems. <3
By @Oras - 8 months
The article is mixing PHP with JS frontend frameworks.

It doesn’t really matter which language you use, it’s about getting the job done. Some people can get thing done quicker in certain languages just because they are good at what they do, not because the tech stack is perfect.

By @davidt84 - 8 months
As I said 8 hours ago when this was first posted ( https://news.ycombinator.com/item?id=41432574https://news.yc... ):

This is an opinion masquerading as fact, backed up by terrible reasoning.

By @hu3 - 8 months
By @pezzer55 - 8 months
I used it a lot way back in the day... Because I was young and it wasn't perl. Then I did a CS degree, and found many better things. I think this summed up my experience: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
By @phplovesong - 8 months
Why would I pick PHP in 2024 for greenfield? There is ZERO benefits.