this post was submitted on 30 Oct 2023
989 points (96.1% liked)

Programmer Humor

32343 readers
1273 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lankybiker@lemmy.world 64 points 1 year ago (4 children)

PHP is amazing

If you're thinking of PHP version less than 8 you need to have another look

Totally stateless. Uncached server side rendered response times in double digit milliseconds.

Types

Extremely battle, highly tested frameworks.

Excellent tooling for tdd, bdd, static analysis, automated browser testing, coding standards and auto fixing. Even fully automated refactoring for things like package upgrades (Rector)

Regular, solid, releases bringing updates and fixes

Arguably one of the best package management systems, Composer. And only one, none of this constantly changing tooling that some other ecosystems seem to do

Properly open source platforms to power all kinds of web projects from e-commerce, CRM, social, scraping, analytics, monitoring, API, CMS, blogging

Basically if your target is server side web stuff then it's really good

Or, you can continue to demonstrate how out of touch you are by continuing with the old "PHP bad" jokes if you want!

[–] 342345@feddit.de 20 points 1 year ago (2 children)

Uncached server side rendered response times in double digit milliseconds.

Thirst thought, that sounds slow. But for the use case of delivering html over the Internet it is fast enough.

[–] moriquende@lemmy.world 16 points 1 year ago

Get this man some water.

[–] naught@sh.itjust.works 3 points 1 year ago (1 children)

Double digit milliseconds sounds slow to you?

[–] aksdb@feddit.de 4 points 1 year ago (2 children)

For a bit of templating? Yes! What drives response times up is typically the database or some RPC, both of which are out of control of PHP, so I assume these were not factored in (because PHP can't win anything there in a comparison).

[–] naught@sh.itjust.works 4 points 1 year ago (1 children)

Anything under like 100ms load is instant to the user, especially a page load. It's a balancing act of developer experience vs performance. To split hairs over milliseconds seems inconsequential to me. I mean, PHP requires $ before variables! That's the real controversy :p

[–] aksdb@feddit.de 4 points 1 year ago

Anything under like 100ms load is instant to the user, especially a page load.

True, but it accumulates. Every ms I save on templating I can "waste" on I/O, DB, upstream service calls, etc.

[–] jaybone@lemmy.world -1 points 1 year ago (1 children)

If it’s stateless and nothing is kept in memory, can you have a connection pool?

[–] aksdb@feddit.de 0 points 1 year ago

If you run it in old-school CGI mode, no, because each request would spawn a new process. But that's nowhere near state-of-the-art. So typically you would still have a long-running process somewhere that could manage a connection pool. No idea if it does, though. Can't imagine that it wouldn't, however, since PHP would be slaughtered in benchmarks if there was no way to keep connections (or pools) open across requests.

[–] xmunk@sh.itjust.works 2 points 1 year ago

Extremely strong functional programmer support, too!

[–] Link@rentadrunk.org 1 points 1 year ago (2 children)

What’s wrong with version 8?

[–] FleetingTit@feddit.de 25 points 1 year ago (1 children)

Dude was saying that 8 is good, but people still think of version 5 when talking about PHP. Not recommended to still use in 2023.

[–] msage@programming.dev 5 points 1 year ago (1 children)

Even 5.3 was good enough.

4 was hilariously bad though

[–] xmunk@sh.itjust.works 1 points 1 year ago

I'd say 5.4 was when it publicly got great - but yea, a lot of ground work for that was in 5.2/5.3

[–] IceMan@lemmy.one 1 points 1 year ago

On the opposite - version 8 is great.

[–] gkd@lemmy.ml 1 points 1 year ago

On the note of testing, Pest is still one of the best testing options I’ve seen across a variety of langs.