logoalt Hacker News

jack_ppyesterday at 4:11 AM8 repliesview on HN

I worked at a startup, they built their API in PHP because it was easy and fast. Now they're successful, app doesn't scale, high latency etc. What does their php code do? 95% of it is calling a DB.

You're telling me today with LLM power multiplier it's THAT much faster to write in PHP compared to something that can actually have a future?


Replies

frioyesterday at 7:16 AM

“PHP was so easy and fast that they’ve built such a successful startup they now have scaling problems” is, as far as I can tell, an endorsement of PHP and not a criticism of it.

show 2 replies
dugganyesterday at 7:19 AM

> I worked at a startup, they built their API in PHP because it was easy and fast. Now they're successful

You can stop there! Sounds like PHP worked for them. Already doing better than 90% of startups.

watermelon0yesterday at 6:05 AM

If 95% of what app does is calling a DB, then the bottleneck is in the DB, not with the PHP.

You can use persistent DB connections, and app server such as FrankenPHP to persist state between requests, but that still wouldn't help if DB is the bottleneck.

show 1 reply
NorwegianDudeyesterday at 7:55 AM

> I worked at a startup, they built their API in PHP because it was easy and fast. Now they're successful, app doesn't scale, high latency etc. What does their php code do? 95% of it is calling a DB.

So PHP worked perfectly, but the DB is slow? Your DB isn't going any faster by switching to something else, if that's what you think.

PHP is the future, where React has been heading for years.

show 1 reply
nake89yesterday at 6:43 AM

Not scaling and high latency sound like a skill issue, not a PHP issue.

Chaosvexyesterday at 12:01 PM

What does this even mean? If you've got scaling problems, it's not because you've used PHP.

arjvikyesterday at 4:12 AM

by future do you mean Future<T> or metaphorical future? :)

rurbanyesterday at 4:58 AM

PHP did better than python and perl. Python is doomed. PHP got a good jit already, a good OO lately, good frameworks, stable extensions. It has a company behind.

Unlike python or ruby which break right and left all the time on updates. you have to use bunkers of venvs, without any security updates. A nightmare.

PHP can scale and has a future.

show 2 replies