Hacker News new | ask | show | jobs
by latenightcoding 2026 days ago
Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.
5 comments

I would guess because the greener pastures are still greener or otherwise maybe just as green? I moved from PHP to Ruby and Rails eight years ago. I _really_ enjoy writing Ruby (I love the syntax) and Rails servers all my web dev needs perfectly. I'm now learning about the joys of functional languages though Elixir/Erlang (a common next step for Rubyists).

The question is: so what if PHP even has caught up? What could I possibly gain from going back to it? I would have to rebuild context and learn a whole new web framework in a language whose syntax I personally do not enjoy. So no matter how good it's become, it's totally not worth my time and energy to switch back to it.

> Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.

I guess some of the reasons why some devs would not chose PHP (horrid syntax, std lib mess, stupid error reporting system, language inconsistencies, the very existance of php.ini, overreliance on C extensions for speed ...), haven't changed. As companies move to single page applications backed by javascript and REST API, PHP CGI style classic execution model provides no advantage, when it comes to generating or serving web content.

Some of the most annoying things in the language (error reporting and type coercing in comparison operators) are fixed in PHP 8.
Some, not all. That alone should answer the question why aren't people coming back.
> As companies move to single page applications backed by javascript and REST API, PHP CGI style classic execution model provides no advantage, when it comes to generating or serving web content

I lol'd.

SPAs are a fad. Apps that rely heavily on REST API and browser rendering rank terribly on Google.

Create a SPA and help your customers discover your competitor on the first page of Google.

I lol'd.

SPAs are great if your customers actually want an application. Figma, AirTable, Google Sheets. These don't make sense as server rendered pages.

If you're in the publishing business and need your articles to rank high on Google, then yeah its probably not a good idea.

EDIT: Or Slack for that matter

This assumes Google can't figure out crawling SPA.
That's correct.

Generally, when I'm building a business, I prefer not to assume that Google will eventually, at some point in the future, solve the crawling a SPA site problem and finally discover my site.

I'd rather get my 70%-80% organic search traffic today, with any boring server-side rendered tech stack.

I don't think I want any crawler ever hitting my API endpoints for customer lookups, scheduling, inventory management, etc - all that stuff that is the 'Application' part of 'SPA'.

Why people use js/spa/etc stuff as the basis for a content/marketing site... I don't know. I mean... yeah, I know why - mostly to expand their skill set. But there's usually no functional benefit, and usually some drawbacks, as you're pointing out.

According to who? PHP is still behind ~70% of public websites: https://w3techs.com/technologies/details/pl-php
Forum share, maybe, but it's been and remains an extremely popular language.
"Greener pastures" does not sound specific so not sure what your argument is. Clarify, please?