Hacker News new | ask | show | jobs
by throw_m239339 2025 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.

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.

2 comments

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.