Comment on 4chan hacked and taken offline. Hacker reopens /qa/ and leaks all admins emails.

<- View Parent
Realitaetsverlust@lemmy.zip ⁨1⁩ ⁨day⁩ ago

Intermingling PHP and HTML is one of PHP strengths

Eeeh, no. It’s a bad practice in 2025. That was a good thing a decade ago.

Trying to modify this blocked CSS is going to be wayyyyyyyyyyyyyyyyyyyy easier than trying to modify a bunch of printed HTML strings broken up by multiple nested conditionals. Plus it’s just straight-up easier to read and straight-forward to understand what the function does right away.

True. But I was just looking at the source code of wordpress for 30 seconds. I could probably find worse.

To harp on this even more, one of the benefits of blocking HTML in this way is IDE highlighting.

Which isn’t a problem if you use a template engine - as you should in modern applications.

I can’t think of a single system that doesn’t “stop PHP executing” at some point to output HTML in some way.

Not a single modern system does that. It’s terrible practice and won’t even pass automated code reviews with sane settings.

source
Sort:hotnewtop