telegra.ph

lankybiker, to programmerhumor in PHP is dead?

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!

Link,

What’s wrong with version 8?

IceMan,

On the opposite - version 8 is great.

FleetingTit,
@FleetingTit@feddit.de avatar

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,

Even 5.3 was good enough.

4 was hilariously bad though

xmunk,

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

nicman24,

he meant 8 is great

nicman24,

not only that but you just install it with the lamp stack setting in ubuntu tasksel with apache and mariadb. the beating that these can take (except maybe the sql) and survive is great. you also have access to the whole of linux to do more advanced stuff, while other languages/ stacks shy away from exec

Slotos,

other languages/ stacks shy away from exec

I’m sorry, what?

amio,

Turns out arbitrary code execution is actually great(!)

nicman24,

it does not have to be arbitrary my dude

Slotos,

Problem is, you’re mixing a number of different concepts into a nonsensical claim.

Exec as an “execute a string as a language instructions” is nothing new nor unique to PHP. Ruby on Rails, for example, uses it in a controlled manner to generate methods on ActiveRecord models.

Exec as an “replace this process with another process” is old news again. It’s not even language specific.

Popen/spawn family (which seems to be what you alluded to) is, once again, nothing new and is used everywhere.

nicman24,

i just meant that python's and node's implementation is shit

sounddrill,

I personally prefer hestiaCP but yes

TheBeege,

All of that can be the same as other stacks except the Apache bit. You can stand up a Go application on Ubuntu hitting MariaDB as its persistence layer. Or Python. Or Node. Or Java. Or even Ruby. Shit, Haskell can do it.

Also, exec is a code smell. Arbitrary code execution is a massive security risk, and the effort to mitigate that risk is often less than explicitly building out the required functionality.

I think you need to explore more technologies, my friend. And read up on some security things

Edit: I now realize you mean exec as in calling out to a shell. All languages have this. Still, the overhead of spawning and managing a new process is often more than just implementing the logic in your application itself.

342345,

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,

Get this man some water.

naught,

Double digit milliseconds sounds slow to you?

aksdb,

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,

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,

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,

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

aksdb,

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,

Extremely strong functional programmer support, too!

gkd,
@gkd@lemmy.ml avatar

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

xusontha, to comicstrips in "Spell and Speak" by Mr.Lovenstein

They always could talk, but they just didn’t feel like it

Luisp,

In fact the miau sound you are used to is produced exclusively in presence of humans, normally they make other sounds

Papanca,

Yes, there were studies where it was proven that these sounds are actively being reinforced by human interactions; cats learn that this works

KpntAutismus,

can confirm. i basically meow at my cat whenever he looks like he wants something. based on how he reacts i can figure out if he’s hungry, needs attention or is just doing his hourly sweep of the house.

pixxelkick, to programmerhumor in PHP is dead?

It’s hard to justify using anything other than JS or if you wanna be fancy, Web Assbly, for the FE.

Any other front end language involves generating Javascript from your language, which inevitably ends up with you making a weird Frankenstein project that mixes the two.

I’d rather just use stuff like Webpack or Vite to compile my JS front-end out of JS (or TS) from the start. It always ends up being a cleaner result.

My backend though can be whatever the fuck I want it to be.

But if you ever think dynamically compiling/transpiling a JS front end on the fly on demand is a good idea, instead of simply just delivering static pre-compiled/transpiled pages, you’re part of the problem for why the web is so slow and bloated.

It’s wild how crazy of projects people will build that take 3 entire seconds to just deliver a 500kb static form that doesn’t even need angular to do anything. They turn a couple hundred kb into several mb for no useful reason, it’s wild.

MyNameIsIgglePiggle,

On that last bit. I agree with you, but people are getting paid to produce, and since they probably just know angular, they use angular everywhere.

pixxelkick,

I prefer html personally :x

But yeah, I mostly blame the project managers that encourage this behavior, it’s wild how much overengineering goes into basic stuff like making mostly static websites.

derpgon,

Same, plain old HTML, and if I need some reactivity then Stimulus. And if need even more reactivity, then VueJS / Alpine. If the form can’t be submitted via a regular submit button, it infuriates me.

savedbythezsh,

To my understanding, you can’t really use WebAssembly for the frontend - it doesn’t support manipulating the DOM, so you still need to offload a lot of the work to JS. It’s an uncontested language when it comes to web frontend.

r1veRRR,

It does support it, it’s just slower than JS. WA is faster in other aspects though, so frameworks that compile to WA (like the Rust framework Leptos) still end up being faster than a lot of JS ones.

araozu,

I find that the only reason for SSR existence is to be able to just move a JS frontend to the backend for SEO/client performonce reasons with almost no effort. If the frontend really needs to be highly interactive then yeah, a FE framework makes things easier. But then you are locking yourself to using JS in the backend. Voluntarily locking yourself to use an objectively bad language.

Then there are the react/angular/other people, who build everything in these frontends.

I really hope tools like htmx gain traction, since it looks like a model able to solve the current JS madness.

pixxelkick,

I’m not liking htmx, I checked it out, it seemed promising, but it has giant gaping security holes in it so I can’t endorse it.

I have been sticking to using Ejs with html-bundler-webpack

The combo is lightning fast and gives me a solid usability of html partials so I can modularize my front end in re-useable chunks.

It compiles to the static site fast for iterative development, it has everything I need baked in for common needs (minification, bundling, transpiling, cache busting, integrity, crossorigin, tree shaking, etc etx)

I like how it let’s me just focus on actually writing the html + js + css and not have to muck around with thirty boilerplate steps to just make the app run.

If I need a lot of reactivity I’ll use vue or angular but I so so rarely need that.

And now with the template element, half the time reactivity can just be done with those.

Only time I actually need react/vue is when I have to frequently mutate/delete in the DOM.

But if I purely am additive, adding things to the DOM, template elements are plenty.

araozu,

Could you elaborate on the htmx security holes? I only know about xss attacks, and for those it’s trivial to sanitize in the backend.

I too gravitate towards just templating for static or simple interactivity, but for pages that need SEO and interactivity I’m still wondering what’s a good solution that doesn’t involve SSR and a js framework. For a recent project I had I generated the html in php and sent a lot of pure js for dom manipulation

pixxelkick,

Htmx has a bunch of logic that basically completely bypasses Content Security Policy stuff, as it has its own pseudo baked in “execute inline js” logic that executes arbitrary javascript via attributes on html elements.

Since this gets executed by the HTMX logic you load in from their library, it effectively allows an attacker to arbitrarily execute js via manipulating the DOM, and Content Security Policy won’t pick it up because HTMX parses the attribute and executes on behalf of it (and you have already whitelisted HTMX in your CSP for it to function)

Result: It punctures a giant hole in your CSP, rendering it useless.

There’s technically a flag you can flip to disable this functionality, but its via the dom so… not reliable imo. If I could pre-compile HTMX ahead of time with that functionality completely disabled to the degree it doesnt even get compiled into the output .js at all, then I would trust it.

But the fact all the logic is still technically there in the library I have loaded and I am purely relying on “this flag in the dom should block this from working, probably”, I don’t see that as very secure.

So until that gets fixed and I can compile htmx with webpack or vite in order to completely treeshake that functionality right the hell out of my output, I aint gonna recommend anyone use it if they want an iota of security on their site. It’s got literally baked in security bypasses, don’t use it.

Hell Id even just be happy if they released a “htmx-lite” package I could use, that just doesnt have that functionality baked in, thatd be enough to make me consider it.

quindraco, to comicstrips in "Last Word" by J.L Westover

It’s just an abbreviation of charisma.

the_post_of_tom_joad,

Woah.

regresses 10 years in age

thanks, youngblood.

Kusimulkku,

And for that reason I’m out

Gabu,

Why?

Ryan213, to memes in Thank God
@Ryan213@lemmy.world avatar

Me: proceeds not to fall back asleep until 6:55AM.

XTL, to programmerhumor in PHP is dead?

PHP isn’t dead. It’s just smelled that way for decades.

Anticorp, to memes in This Event is True. Image is false.

So nobody thought to tell the goalie that the game was over? He didn’t hear anyone leaving the field, or the crowd dispersing? This is weird, especially since snopes says it is true.

DarkSirrush,

Fog dampens sound more than you may think, it’s very possible he heard absolutely nothing, and with it being so thick no one would be able to tell he was still there.

Anticorp,

I wonder if the entire time he was thinking his team must be running a monster offense since he hadn’t had to defend in so long.

JustMy2c,

With so much fog, nobody wonders why someone is 15min late :D

Nastybutler,

He did, according to his autobiography quoted in the Snopes article.

Kase,

I like to think that there was a person holding the camera who knew all along and just wanted to see how long the guy would stand there

testgoatpleaseignore, to memes in Be a cat

deleted_by_author

  • Loading...
  • danc4498,

    For the birds

    lugal,

    You mean drones?

    If it flies, it spies

    ultratiem, (edited )
    @ultratiem@lemmy.ca avatar

    Birds arent real bruh

    Holzkohlen,
    @Holzkohlen@feddit.de avatar

    WAY ahead of you.

    pg_sax_i_frage,

    for the /a human equivalent, of getting oneself neutered, sort of,… where was I going withtthis… oh yes, /c/childfree is on lemmy now. And there’s chidfree.cc (includes link to the lemmy and github,… includong data for thise intrested in getting medical pracedutres done rot that themselves).

    CurlyMoustache, to comicstrips in "Veryfying Estimates" by Work Chronicles
    @CurlyMoustache@lemmy.world avatar

    This is like when the customer loudly proclaims they can get the item cheaper somewhere else, and just stare at you like a cow in a field when you say they should go there then

    tigerjerusalem, to memes in I lose mine last month :(

    I just realized that each phone comes with one and only one of SIM ejectors, and I have a lot of those in my drawer. I think I have a problem. -_-

    radioactiveradio,

    You’re responsible for everything!!!

    spudwart,

    Most screw-driver kits like the IFixIt kits, include a sim-eject head.

    adespoton,

    Me too… and my phone uses an eSIM!

    GeneralVincent,

    The chosen one!

    KnowledgeableNip, to 196 in Tutorial Rule

    Step 1: Coding in Assembly

    xintrik,

    Step 0.5: sourcing raw silicon.

    johnyrocket,

    Step 0.75: Learn UV Lithography by watching entire Asianometry back catalog.

    Malgas,

    If you wish to create a folder in Windows 10 from scratch, you must first invent the universe.

    (Apologies to Carl Sagan.)

    Pinklink, to cat in What You hate Tuna?

    Cats don’t meow at each other. Isn’t that weird? They communicate with each other in other ways, but meowing is a strictly cat->human communication behavior

    rockSlayer,

    That’s because cats use meowing to get attention of their mother. When cats meow at you, they’re essentially saying “parent, help me with this thing”. Usually that thing is begging for food at 5am

    JoShmoe,

    What’s your source?

    joel_feila,
    @joel_feila@lemmy.world avatar

    Living with cats

    JoShmoe,

    Unless you speak for rockSlayer I’m still not convinced

    agent_flounder,
    @agent_flounder@lemmy.world avatar

    How about this…

    www.aspca.org/pet-care/…/meowing-and-yowling

    Meowing is an interesting vocalization in that adult cats don’t actually meow at each other, just at people. Kittens meow to let their mother know they’re cold or hungry, but once they get a bit older, cats no longer meow to other cats. But they continue to meow to people throughout their lives, probably because meowing gets people to do what they want.

    JohnDClay,

    It was revealed to me in a dream

    JoShmoe,

    Now we’re talking.

    Ziglin,

    probably being woken up at 5am by a cat.

    ericisshort,

    There are plenty of videos that disprove what you’re saying. Cats do meow at each other, especially as a form of aggression, where it’s usually the deep and long almost growl-like meow.

    agent_flounder,
    @agent_flounder@lemmy.world avatar

    That’s a yowl not a meow.

    Explained more here:

    www.aspca.org/pet-care/…/meowing-and-yowling

    ericisshort,

    Thanks, I’ve never heard it called a yowl. TIL

    Having said that, I kinda wish it were named “yeow.”

    CarbonIceDragon,
    @CarbonIceDragon@pawb.social avatar

    From what I understand, a lot of cat vocalizations to humans like meowing and purring are primarily things kittens do that cats later stop as they grow, to communicate with their mother. They learn to continue using such vocalizations with humans because humans don’t understand their body language as readily, so they discover that, for example, a certain type of meow when hungry might remind a human to feed it, and keep doing it. This also means that the meaning of a given sound is somewhat specific to a given cat, rather than some sort of universal cat language. Or at least, this is what Ive read

    Pinklink,

    STFU you can’t say I’m wrong on the internet in front of all these people who’s opinion I care deeply about! You wrong and I’m going to dig my heels in till I reach Australia!

    Jk I like how most of Lemmy actually doesn’t do that bs. But seriously thank you for the further insight

    ohwhatfollyisman, to memes in Can't outsmart your teacher

    i dunno, it’s always the little things that make one smirk.

    phorq, to 196 in Potato Rule

    This is the first time I’ve wanted potatoes mashed but not because I’m hungry…

    Omgarm,

    Vanquished potatoes sound tasty.

    FlyingSquid,
    @FlyingSquid@lemmy.world avatar

    Revenge is a baked potato best served cold.

    Slovene,

    Mac wants the flamethrower!

    DharmaCurious, to memes in It can become anything
    @DharmaCurious@startrek.website avatar

    Girls, too. I grew up with this girl that always collected cool looking sticks, rocks, et cetera. Her room looked like what a bedroom would look like if a raven made a wish to be human. Ended up wiccan, and still collects cool sticks and rocks. Haha.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines