That post seems to be missing.
magic_lobster_party 134 points a year ago

PHP will remain alive as long Wordpress is still being used.

path: 0 18319080, hotness: undefined, score: 134, children: 1
Scrollone 23 points a year ago

But let's not forget that the WordPress codebase is absolute dogshit.

And not an example of how to write proper modern PHP.

path: 0 18319080 18327763, hotness: undefined, score: 23, children: 0
Decq 101 points a year ago

Let's be honest though. The early PHP versions were absolute dog shit. And the definition of how not to design a programming language. That said, that never stopped anyone in web development from using it apparently. No clue what modern PHP looks like, apparently it's better now.

path: 0 18319508, hotness: undefined, score: 101, children: 14
kingofras 60 points a year ago

Was not intended as programming language. The name literally stands for Hypertext PreProcessor. It was meant to be a script injector for HTML back when the internet was still fun.

Then it got out of hand and PHP didn’t evolve fast enough to be a web technology leader, but never ceded the position of old trusty workhorse, and still powers a significant part of websites.

path: 0 18319508 18321103, hotness: undefined, score: 60, children: 3
Decq 23 points a year ago

I somewhat know the history of PHP and how it came to be. And that it was just a personal project that suddenly got big. So I don't blame the creator. But that still doesn't make it a good language.

path: 0 18319508 18321103 18321532, hotness: undefined, score: 23, children: 0
lol_idk 15 points a year ago

Personal Home Page

path: 0 18319508 18321103 18322433, hotness: undefined, score: 15, children: 0
kernelle 7 points a year ago

OOP programming in PHP is pretty fun, keeping up with it's deprecations and vulnerabilities is not

path: 0 18319508 18321103 18322229, hotness: undefined, score: 7, children: 0
thesystemisdown 20 points a year ago

Modern PHP is better because it's modern. Which early version of a programming language was good? I've used a lot of them, and by modern standards, I think dog shit is a somewhat appropriate description for most of them.

path: 0 18319508 18321207, hotness: undefined, score: 20, children: 4
azertyfun 14 points a year ago

It's one of a plethora of scripting languages from the '90s which were designed to be the antithesis of "fail fast" and kept going no matter what.

I guess what with C/C++ being the Mainstream Option at the time, not having to deal with a strict compiler must have felt like freedom. As someone who has had to maintain, cleanup and migrate ancient PHP code, I call it folly. That mindset of "let the programmer just do whatever and keep trucking" breeds awful programming practices and renders static analysis varying degrees of useless, which makes large-scale refactoring hard to automate which is just amazing when your major versions aren't even remotely FUCKING BACKWARDS COMPATIBLE.

PHP's original design is just fundamentally atrocious. It became popular in large part because unmaintainable code is usually someone else's problem.

A language that I would definitely use for server-side rendering and that was already good from its first stable release is Go. It was thoughtfully designed and lends itself really well to static analysis, while still being easy to write and decently performant.

path: 0 18319508 18321207 18324755, hotness: undefined, score: 14, children: 0
Decq 7 points a year ago

It's been about 20 years since I've touched PHP. So i don't remember all the problems i had with it.

But some language from those times were at least consistent with itself and clearly more thought-out. Even though they might miss some of the nicety we've come to like nowadays. Of course for web development there weren't many better choices back then.

But I'm heavily skewed towards non-oo, static typed, explicit languages so PHP was probably never for me.

path: 0 18319508 18321207 18321648, hotness: undefined, score: 7, children: 0
ByteWelder 4 points a year ago
path: 0 18319508 18321207 18334771, hotness: undefined, score: 4, children: 1
bestboyfriendintheworld 1 point a year ago

Early Swift was very slow to compile and start. The debugger was nonfunctional.

Otherwise it was pretty usable. Especially since it got to leverage the huge libraries written for Objective-C.

Which meant it lacked some basic collection types. A Swift native Set was introduced with Swift 3 IIRC. Before that you had to bridge back and forth between Swift and Objective-C. Sometimes leading to unexpected behavior at runtime.

In Objective-C if an object reference was nil, you could send it messages (call methods) without a problem. Swift however did away with this. Optionals had to be explicitly unwrapped. So if the annotations weren’t correct, Swift code would crash at runtime where Objective-C would have been fine. Lots of bugs related to that existed.

Swift peaked around version 4. Since then, they have been adding kitchen sink features and lots of complexity to feel smart.

I still would have preferred an Objective-C 3.0. Chris Lattner was a C++ guy and never really understood Objective-C culture and strengths.

path: 0 18319508 18321207 18334771 18394808, hotness: undefined, score: 1, children: 0
chunes 11 points a year ago

I've never heard of a programming language that people don't consider shit

path: 0 18319508 18333168, hotness: undefined, score: 11, children: 1
Rozauhtuno 5 points a year ago

Holy C.

path: 0 18319508 18333168 18334015, hotness: undefined, score: 5, children: 0
friend_of_satan 10 points a year ago

IMHO the killer feature was mod_php. Writing server-side website logic was stupid easy with that. I think if it weren't for that, php wouldn't have been nearly as popular.

I quit using it like 10 years ago, but I'm happy with what I did with it and got from it.

path: 0 18319508 18321470, hotness: undefined, score: 10, children: 0
nilloc 6 points a year ago

When I was using Ruby (some Rails, but mostly Sinatra, for little web apps and api serving) Laravel was coming up in PHP shops. Which was just trying to be Rails running on PHP from what I could tell.

There were others before that, like CakePHP, but all I remember about that of all the bugs my coworkers dealt with. I was strictly a front end dev back then.

path: 0 18319508 18321240, hotness: undefined, score: 6, children: 0
ThirdConsul 3 points a year ago

No clue what modern PHP looks like

Like worse C#.

path: 0 18319508 18322726, hotness: undefined, score: 3, children: 0
BlameTheAntifa 82 points a year ago

In PHPs defense, it keeps evolving in positive, meaningful ways. If you are up to date with it, it’s quite sophisticated and enjoyable. Doubly so if you use a framework like Laravel.

path: 0 18322164, hotness: undefined, score: 82, children: 10
mriswith 21 points a year ago

Most memes or jokes referencing a direct problem in PHP, are old or made by people who haven't touched the language in a decade(version 7 was in 2015, and it removed/fixed a lot of issues and added needed features).

There's also the huge looming thing that a lot of programmers forget: Websites like Wikipedia run on PHP, not to mention the amount of WordPress and similar websites are out there. Which means it will keep going strong. And for a while Facebook also used quite a lot of it, to the point where they made a rudimentary compiler instead of rewriting parts in more efficient languanges.

path: 0 18322164 18325099, hotness: undefined, score: 21, children: 1
Scrollone 5 points a year ago

Also, most of the websites are made with WordPress, which... take a guess, yes, it runs on PHP!

(even though WordPress is a bad example because it's written in a horrible and ancient way)

path: 0 18322164 18325099 18327719, hotness: undefined, score: 5, children: 0
LovableSidekick 10 points a year ago

I agree. A lot of people who mock PHP know almost nothing about it but they know they're supposed to hate it because all the cool kids do.

path: 0 18322164 18325136, hotness: undefined, score: 10, children: 2
Krudler 1 point a year ago

"What's the best tool"

"LINUX!!!!"

"Weird because I haven't told you what I'm trying to build yet"

path: 0 18322164 18325136 18394873, hotness: undefined, score: 1, children: 1
LovableSidekick 2 points a year ago

I would have gone with hammer.

path: 0 18322164 18325136 18394873 18397514, hotness: undefined, score: 2, children: 0
glorkon 7 points a year ago

... or even Symfony.

path: 0 18322164 18324006, hotness: undefined, score: 7, children: 1
SkaveRat 4 points a year ago

I'm still confused why laravel is more popular. Symfony is so much nicer to use and maintain

path: 0 18322164 18324006 18330061, hotness: undefined, score: 4, children: 0
SavinDWhales 5 points a year ago

PHP 8.4 is pretty good, TBH. You absolutely CAN write great code with modern PHP. ... Shame that most PHP I touch is legacy code that's at MOST PHP 7.4 - which is EOL since November '22 and has to be upgraded or replaced. 😬

path: 0 18322164 18335274, hotness: undefined, score: 5, children: 0
mad_lentil 3 points a year ago

Yeah last time I used it was with a laravel monolith and actually it wasn't that bad.

path: 0 18322164 18336381, hotness: undefined, score: 3, children: 0
marcos -1 points a year ago

Yeah, if you add tons of extra rules and tools, it can become almost as pleasant as the main Python or Ruby experience.

Almost.

path: 0 18322164 18324060, hotness: undefined, score: -1, children: 0
merc 46 points a year ago

Where I live, I still see people in a horse-drawn wagon. So, I guess horse-drawn wagons never died? It's only used for tourists and weddings, but that counts, right?

According to Tiobe, PHP was the programming language of the year in 2004. In 2010 it was number 3 in the top 10 programming languages. It's now out of the top 10 entirely. There really isn't a language that has completely disappeared. Mainframes are still programmed using COBOL, Scientists are still using FORTRAN, even Lisp, which has been around since the 1950s, is still going strong.

Maybe Actionscript counts as truly dead, since it was tied to Adobe Flash, and Flash is truly dead?

I have a lot of bad memories of PHP. It was, for a brief time, the main language I used, but it was so ugly and inconsistent. The only thing I loved about it, at the time, was that it wasn't Visual Basic. As bad as PHP was, at least I wasn't making web pages in that pile of hot garbage. But, I never felt joy writing something in PHP. At best it was a slog. At worst it was like pulling teeth.

Just about every other language has given me moments of fun. Original Javascript was a mess, but it already contained scheme-like features. It was sold as being an interpreted version of Java, but it had features that Java wouldn't have for at least a decade. C is a brutal and unforgiving language, but as long as you're not working with strings, it's great to have such low-level control over everything.

Maybe PHP has evolved like other languages, but I still am not interested in trying it out. Everything it was good at can be done better by other languages, and those are languages that give me joy, not pain. I hope it keeps dropping in the rankings so that people aren't exposed to it as one of their first languages.

path: 0 18325053, hotness: undefined, score: 46, children: 18
kameecoding 15 points a year ago

Yeah, I think this is a more fitting meme to be about Java, because despite all the java is dead articles it's still like one of the top most used language, if anything is a serious backend service it likely runs on Java.

path: 0 18325053 18326819, hotness: undefined, score: 15, children: 7
merc 8 points a year ago

Java is a better fit. It hasn't fallen in popularity the way PHP has. But, I'm not convinced that serious backend services mostly use Java. It's one of the languages used, sure. But, I don't know if it beats C/C++ or Go. Apache's C. Nginx is C. Kubernetes is Go. Docker is Go.

I think Java has a niche with certain kinds of business logic applications, and those are pretty common. I would guess that in a typical set of interactions with a Google product, or a Meta product, or an AWS product, some parts of the traffic will be handled by services written in Java. But, others will be C/C++ or Go. There will probably also be some parts of the process that are PHP or Ruby or Python, and a lot of Javascript.

path: 0 18325053 18326819 18327436, hotness: undefined, score: 8, children: 6
kameecoding 9 points a year ago

I can only speak for what I see in the central European market, big banks like Unicredit (literally primefaces frontend), Erste group is running Java, basically all government services are Java.

Java is by far the dominant language on the job market in terms of number of open positions and salary.

path: 0 18325053 18326819 18327436 18330578, hotness: undefined, score: 9, children: 0
cute_noker 8 points a year ago

Most developers are not going to create the next kubernetes. For me it is usually down to earth integrations. Take this file from s3, send as email and sftp here. Create API to proxy another API. Take messages from Kafka, put on rabbitMQ. Save messages from rabbitMQ to database.

I think Java is very strong with libraries. Especially with Spring Boot and camel. I don't really see it as niche but more of a plain boring peanut butter sandwich. Boring. Unexciting. But works.

I am however trying to convince my boss to allow kotlin. Which has access to all the java libraries

path: 0 18325053 18326819 18327436 18327823, hotness: undefined, score: 8, children: 2
merc 3 points a year ago

Most developers are also not going to create a "serious backend service". Most are making a random website, or chaining together a few "business logic" items. I think we're just talking about different levels of "serious backend service". Like, if you mean someone making a website for the biggest industrial machinery company in the fortune 500, but it's all B2B stuff and so it handles at most hundreds of QPS, then I think you'll find a lot of Java there. I just think that for the biggest B2C companies in the world that handle hundreds of thousands of QPS, it's not exclusively Java.

I'm not trying to say Java is bad or anything. It's just that it has a few quirks (like garbage collection) that start to matter when you're getting eye-watering levels of traffic. So, for the most serious of the "serious backend services" I think you see Java, but you also sometimes see C/C++ and Go.

path: 0 18325053 18326819 18327436 18327823 18331504, hotness: undefined, score: 3, children: 1
bestboyfriendintheworld 1 point a year ago

Java has been running serious server software since the mid 1990s. Think WebObjects running on Solaris. Lots of business stuff with big databases still run infrastructure like that.

Java still has the big advantage of being machine agnostic. No need to recompile for ARM or Intel.

path: 0 18325053 18326819 18327436 18394989, hotness: undefined, score: 1, children: 1
merc 1 point a year ago

Yes, and?

path: 0 18325053 18326819 18327436 18394989 18397000, hotness: undefined, score: 1, children: 0
PumaStoleMyBluff 10 points a year ago

There are still Amish and Mennonite communities who use horse-drawn wagons and farm implements their whole lives.

Not really meant to be an argument to your point, just interesting to know.

path: 0 18325053 18330033, hotness: undefined, score: 10, children: 1
merc 5 points a year ago

It's definitely cool to see when you get into Western Pennsylvania, for example.

path: 0 18325053 18330033 18331515, hotness: undefined, score: 5, children: 0
bytesonbike 8 points a year ago

Laravel brought life back to PHP for me. It's elegant. I feels like speaking.

And PHP 8 is light-years away from the garbage I grew up on.

path: 0 18325053 18325267, hotness: undefined, score: 8, children: 3
merc 2 points a year ago

I took a look and threw up in my mouth a little. That's not how backslashes should be used.

Instead of writing their frontend templates in PHP via Blade, many developers have begun to prefer to write their templates using React or Vue.

So... the only thing that PHP is really good for should be replaced by React or Vue Javascript / Typescript?

To each their own, but for me that's a no.

path: 0 18325053 18325267 18325678, hotness: undefined, score: 2, children: 2
SkaveRat 2 points a year ago

Tell me you haven't looked at php in 15 years without telling me you haven't looked at php in 15 years

path: 0 18325053 18325267 18325678 18330046, hotness: undefined, score: 2, children: 1
merc 0 points a year ago

I just looked, that was the basis of my comment. It's bad, in particular that "Laravel" thing was awful.

path: 0 18325053 18325267 18325678 18330046 18331523, hotness: undefined, score: 0, children: 0
dlb 4 points a year ago

I wouldn’t even say that Flash is truly dead, thanks to emulators like Ruffle. You can still make a movie or game in Flash MX 2004, which is freely available now, and have it run in the browser. That said, last I looked (years ago) only AS2 was supported, so AS3 might be well and truly dead (rip my first language).

path: 0 18325053 18326429, hotness: undefined, score: 4, children: 0
ChickenLadyLovesLife 4 points a year ago

There really isn’t a language that has completely disappeared.

How about that shit where a "program" was a bunch of patch cables plugged into various sockets? That shit is gone, man.

path: 0 18325053 18328806, hotness: undefined, score: 4, children: 2
sukhmel 2 points a year ago

Just for the sake of being contrary, I know that there are still machines running on punch cards in some army-related places, where not changing anything is mandatory. I wouldn't be surprised if hot-wiring is also still there somewhere, it's just mostly running without changes.

path: 0 18325053 18328806 18333275, hotness: undefined, score: 2, children: 1
ChickenLadyLovesLife 3 points a year ago

The original Moog synthesizers used patch cords (in fact that's why a synthesizer instrument sound is still called a "patch") and I'm sure somebody somewhere is still fucking around with one of those.

path: 0 18325053 18328806 18333275 18334168, hotness: undefined, score: 3, children: 0
darvit 41 points a year ago

Everyone in this thread: PHP sucks because it was bad when I last used it 20 years ago.

path: 0 18328938, hotness: undefined, score: 41, children: 12
ICastFist 17 points a year ago

It's still bad nowadays, and it's the main language used on pretty much every system of several state level secretaries in Brazil. My colleagues work with it daily (I don't program, thankfully) and they're not exactly fond of it. Legacy systems, man

path: 0 18328938 18330173, hotness: undefined, score: 17, children: 0
dreadbeef 9 points a year ago

Backend devs: JS sucks because I never learned it actually

path: 0 18328938 18335784, hotness: undefined, score: 9, children: 0
TheKingBee 7 points a year ago

I mean it does suck, but it sucks less than anything else we have.

path: 0 18328938 18329580, hotness: undefined, score: 7, children: 8
balsoft 13 points a year ago

PHP is far from "least bad language". Nowadays it is an ok language, one of many. You can also write ok code in it. The main issue is that it's really easy to write horrible shit that just barely works and will break when you look at it wrong. In fact without a lot of knowledge and experience that is the code you will probably write.

There are much better languages for any webdev niche you can think of, and some that are just better for webdev overall (e.g. Elixir). The reason PHP is still relevant is mostly huge legacy codebases that require a lot of engineering power to maintain (because PHP is not a good language for maintenance).

The way I look at it is that PHP is the C++ of webdev (but slightly worse).

path: 0 18328938 18329580 18335905, hotness: undefined, score: 13, children: 0
ICastFist 8 points a year ago

Nah, i'd say java has been better than PHP overall

path: 0 18328938 18329580 18330143, hotness: undefined, score: 8, children: 2
InternetCitizen2 4 points a year ago

That's also 30 years old, old man!

path: 0 18328938 18329580 18330143 18330651, hotness: undefined, score: 4, children: 1
sukhmel 6 points a year ago

A language usually doesn't become worse with time, at least if the devs do a good job at improving it.

There are cases of new languages that looked better but didn't become mainstream because the ecosystem requires time to grow (and adoption, which creates a vicious cycle because adoption requires ecosystem to already be there)

path: 0 18328938 18329580 18330143 18330651 18333328, hotness: undefined, score: 6, children: 0
zalgotext 6 points a year ago

IDK, I like Django/DRF

path: 0 18328938 18329580 18329760, hotness: undefined, score: 6, children: 3
PolarKraken 6 points a year ago

FastAPI ftw, fight me! Lol jk Django is cool and useful and serves a different need, quite well from what I understand.

path: 0 18328938 18329580 18329760 18331755, hotness: undefined, score: 6, children: 2
zalgotext 3 points a year ago

Lol I've used both, FastAPI is nice too! I think my ideal situation would be FastAPI's endpoints/routing, combined with Django's ORM and DRF's automagic serializers/viewsets.

path: 0 18328938 18329580 18329760 18331755 18337341, hotness: undefined, score: 3, children: 1
PolarKraken 1 point a year ago

Dangit. That's me too, I just saw your comment before posting one myself 😅

path: 0 18328938 18331709, hotness: undefined, score: 1, children: 0
lime 40 points a year ago

my entire way of reasoning about programming languages changed when i read on article about how hating on php was misogynistic. i clicked on it because it just sounded like yet another ragebait, but it made sense.

basically, since php is simple, and integrated with html, the vast majority of php devs started out as designers who later got into code. since php has always been a mess, nobody wanted to build mainstream tooling for it except the people actively working with the language. this means that mainstream ideas about language and tooling design didn't percolate down to php like it has done to most languages. so php devs, when exposed to tooling the rest of the world takes for granted, are usually overwhelmed because not only is there a lot of it, nobody in php-land uses tools like that. so they get called bad devs of a bad language. some of them, who really like to code, push through this massive difficulty spike, while others just assume that "actual programming" is too hard and go back to design, even though tooling usage has little to do with your skill as a programmer.

the kicker, of course, being that web design has more women than most other dev specialisations.

path: 0 18320566, hotness: undefined, score: 40, children: 24
kshade 26 points a year ago

Is disliking something that (allegedly) is more popular with women than the average thing of its category anti-woman, even if no part of the complaint involves the user or their gender? The majority of users is likely still male anyway.

path: 0 18320566 18322102, hotness: undefined, score: 26, children: 5
lime 17 points a year ago

not directly, but trash-talking it and gatekeeping "real programming" from the language most likely to be used by women is not exactly conducive to improved equality in the profession.

i realise now that i didn't explicitly mention my point in the first post, so:

  • shitting on other people's jobs is bad.
path: 0 18320566 18322102 18322320, hotness: undefined, score: 17, children: 2
kshade 9 points a year ago

So PHP may be trash, but don't treat the people using it like trash? Makes sense to me.

path: 0 18320566 18322102 18322320 18322806, hotness: undefined, score: 9, children: 1
lime 7 points a year ago

lift people up instead of pushing them down. we don't make fun of the language someone is using, we help them get better.

path: 0 18320566 18322102 18322320 18322806 18325424, hotness: undefined, score: 7, children: 0
Magnum 7 points a year ago
path: 0 18320566 18322102 18324053, hotness: undefined, score: 7, children: 0
ChickenLadyLovesLife 4 points a year ago

Is disliking something that (allegedly) is more popular with women than the average thing of its category anti-woman, even if no part of the complaint involves the user or their gender?

According to my sister-in-law, yes. I don't like Taylor Swift's music and apparently that makes me a misogynist.

path: 0 18320566 18322102 18328865, hotness: undefined, score: 4, children: 0
lilja 17 points a year ago

In the start of my career I felt that there was a sentiment around web dev that it's not "real" programming in a way. Not sure if that's the case any more seeing as the majority of modern develoment is for web platforms.

I've never heard the idea that PHP is a language used by web designers who migrated to coding, but it kind of makes sense. How PHP works, where everything is just HTML until the <?php tag comes in, made it so attractive as a way to add some spice to static pages. I cut my teeth on PHP and moved on to other languages later, so it makes sense that it would function as a gateway drug of sorts, also resulting in it not getting the attention from seasoned experts that other languages benefit from.

Calling dislike of PHP misogynistic feels like a massive stretch.. but maybe it's not considering how the designer/programmer divide also has a massive gender disparity. PHP has its problems, tooling being just one side of it, and its nature as a designer-friendly language makes it easy for elitists to mask their bigotry behind "objective" arguments that PHP is bad.

path: 0 18320566 18320892, hotness: undefined, score: 17, children: 1
lime 7 points a year ago

i think the wording of the original article was intentionally inflammatory, but "the purpose of a system is what it does". if shit-talking php causes women to leave the profession, it doesn't really matter what the intent was.

path: 0 18320566 18320892 18322379, hotness: undefined, score: 7, children: 0
magic_lobster_party 8 points a year ago

The main issue with PHP is that it’s designed for a pre AJAX web. Before when there was a real distinction between backend and frontend. The idea with PHP is that the server code is responsible of generating HTML on the fly.

Server code generating HTML is icky in modern web development.

path: 0 18320566 18320893, hotness: undefined, score: 8, children: 14
lime 23 points a year ago

it's what html was designed for. there's nothing icky about it. with htmx et al the serverside web is coming back in a big way so we can finally drop this react stuff.

path: 0 18320566 18320893 18321313, hotness: undefined, score: 23, children: 2
magic_lobster_party 1 point a year ago

Now it was a great while ago I wrote anything in PHP. What icks me is the separation of concern. It has a tendency to cause code that’s concerned with logic and rendering at the same time. The act of moving a button can interfere with the logic, and it obfuscates how the entire website looks like.

Maybe there’s better coding practices to ensure better separation of concern in PHP.

path: 0 18320566 18320893 18321313 18323419, hotness: undefined, score: 1, children: 1
lime 2 points a year ago

that just sounds like what i hear from react devs.

path: 0 18320566 18320893 18321313 18323419 18325403, hotness: undefined, score: 2, children: 0
shnizmuffin 17 points a year ago

Server code generating HTML is icky in modern web development.

There's been a big uptick in interest around SSR lately, so maybe not.

path: 0 18320566 18320893 18321227, hotness: undefined, score: 17, children: 0
eager_eagle 16 points a year ago

What's actually icky is making a website an SPA, duplicating business logic in the back and front, when it could perfectly be served as a server side rendered HTML.

path: 0 18320566 18320893 18322415, hotness: undefined, score: 16, children: 0
drmoose 9 points a year ago

What absolutely no. Server side generated code is still king in the right hands. Why have client lift all of thay when server side html rendering basically costs nothing. Even strong js driven front end you can still add much through server side by providing proper hydration paths. Good devs take advantage of both worlds but server side is incredibly powerful today.

path: 0 18320566 18320893 18322509, hotness: undefined, score: 9, children: 0
frezik 6 points a year ago

AJAX everything is icky. It's part of what's made browser tabs take more RAM than a typical desktop had in 1998.

I exercised all client side JavaScript from an app I maintain. It's fast, clean, and the back button always works. I just checked on one of the more complicated pages, and according to Firefox's memory profile, it takes about 2.6MB of RAM.

Where PHP really goes wrong is mixing HTML and code by default.

path: 0 18320566 18320893 18323217, hotness: undefined, score: 6, children: 5
bitcrafter 5 points a year ago

I exercised all client side JavaScript from an app I maintain. It’s fast, clean, and the back button always works. I just checked on one of the more complicated pages, and according to Firefox’s memory profile, it takes about 2.6MB of RAM.

Wow, that really is a light weight! What exercise do you have your code perform to get such impressive results?

path: 0 18320566 18320893 18323217 18324252, hotness: undefined, score: 5, children: 4
frezik 3 points a year ago

No JavaScript, just HTML and CSS. Basically no images. The heaviest page dumps 50 rows of logs in a table.

It's admittedly a fundamentally simple frontend, but we all know of frontends with a simple job and a not so simple frontend.

path: 0 18320566 18320893 18323217 18324252 18324837, hotness: undefined, score: 3, children: 3
HakFoo 6 points a year ago

I believe the huge mistake in HTML wasn't having some sort of element-level addressability.

People went insane over "the page flashes for 15ms because we have to reload the header and footer and it doesn't look NAAATIVE!" and the response was to SPA/AJAX everything, inviting a huge Turing-complete nightmare of possibilities when 95% of what peopleneed would be delivered with < form action="blah" replace_with_response="#foo" >

That and a dearth of native widgets-- a < combobox > and a < menu > that worked like the system menus might have kept JavaScript as the sick oddity it should be.

path: 0 18320566 18320893 18322838, hotness: undefined, score: 6, children: 0
irelephant 3 points a year ago
path: 0 18320566 18320893 18322302, hotness: undefined, score: 3, children: 0
Tonava 8 points a year ago
path: 0 18320566 18320894, hotness: undefined, score: 8, children: 0
jenesaisquoi 27 points a year ago

Ah yes, the language that picked strlen as the hash function for its hashtables.

path: 0 18331840, hotness: undefined, score: 27, children: 6
Blackmist 15 points a year ago

Javascript is living proof that your language doesn't need to be good to be used.

I tripped over this one in Delphi the other day.

function AnsiStartsText(const ASubText, AText: string): Boolean;
function AnsiEndsText(const ASubText, AText: string): Boolean;
function AnsiContainsText(const AText, ASubText: string): Boolean;
path: 0 18331840 18334155, hotness: undefined, score: 15, children: 1
mad_lentil 4 points a year ago

Too late to change it now

path: 0 18331840 18334155 18336314, hotness: undefined, score: 4, children: 0
keepee 9 points a year ago

Can you elaborate on this?

path: 0 18331840 18332261, hotness: undefined, score: 9, children: 1
jenesaisquoi 6 points a year ago path: 0 18331840 18332261 18333014, hotness: undefined, score: 6, children: 0
vivalapivo 5 points a year ago

Waaaaaaat

path: 0 18331840 18333489, hotness: undefined, score: 5, children: 1
jenesaisquoi 7 points a year ago path: 0 18331840 18333489 18333603, hotness: undefined, score: 7, children: 0
JimVanDeventer 25 points a year ago

Happy 44th birthday IPv4! 🥳

path: 0 18322585, hotness: undefined, score: 25, children: 0
cupcakezealot 24 points a year ago

this is perl erasure

also php didn't cause the internet to suck; overreliance on javascript (and js based frameworks) did. there's a reason that modern internet is so slow and clunky and it's not php. at least php has the capabibility to improve over time not degrade.

path: 0 18335065, hotness: undefined, score: 24, children: 0
ursakhiin 22 points a year ago

PHP will never die. As long as code is written there will be PHP developers there to claim it's good now.

path: 0 18332283, hotness: undefined, score: 22, children: 1
bufalo1973 1 point a year ago

Just like COBOL

path: 0 18332283 18345092, hotness: undefined, score: 1, children: 0
Simulation6 21 points a year ago

Well, at least PHP isn’t as bad as JSP.

path: 0 18323437, hotness: undefined, score: 21, children: 5
LovableSidekick 16 points a year ago

Or TSP (trisodium phosphate) - which you can't even make websites with, but it's great for cleaning oil spots off the driveway.

path: 0 18323437 18325120, hotness: undefined, score: 16, children: 2
PolarKraken 4 points a year ago

Well, now, that's useful, but we shouldn't fail to mention good ol HCl, muriatic acid colloquially for this purpose, also great for cleaning oil stains from a driveway!

path: 0 18323437 18325120 18332931, hotness: undefined, score: 4, children: 0
Lenggo 4 points a year ago

I laughed pretty hard at this while also unexpectedly learning how to clean up a mess I made changing the oil in my car on a particularly windy day recently!

path: 0 18323437 18325120 18326656, hotness: undefined, score: 4, children: 0
GreenKnight23 15 points a year ago

jsp answered the question, "What if Java was like PHP but with more Java?"

jsp deserved to die.

path: 0 18323437 18323903, hotness: undefined, score: 15, children: 1
bhamlin 13 points a year ago

We heard you liked garbage collection so we put garbage in your language.

path: 0 18323437 18323903 18324740, hotness: undefined, score: 13, children: 0
SpaceNoodle 21 points a year ago

Replaced the P in LAMP with Python when I started building webpages again a few years ago, and never looked back. Such a vastly more pleasant experience.

path: 0 18323731, hotness: undefined, score: 21, children: 20
petersr 8 points a year ago

I am an advocate for LKPPR (Linux, Kubernetes, Postgres, Python, React). Doesn't roll off the tongue that well.

path: 0 18323731 18324444, hotness: undefined, score: 8, children: 13
bhamlin 18 points a year ago

LicK PaPeR

path: 0 18323731 18324444 18324730, hotness: undefined, score: 18, children: 2
petersr 11 points a year ago

path: 0 18323731 18324444 18324730 18325178, hotness: undefined, score: 11, children: 0
rumba 6 points a year ago

Replace Postgres with Valkey, then it's LicK ViPeR

path: 0 18323731 18324444 18324730 18325205, hotness: undefined, score: 6, children: 0
SpaceNoodle 7 points a year ago

Get that fucking JavaScript out of here

path: 0 18323731 18324444 18325309, hotness: undefined, score: 7, children: 9
v_krishna 1 point a year ago

Typescript makes for a whole different experience on the FE

path: 0 18323731 18324444 18325309 18328936, hotness: undefined, score: 1, children: 1
SpaceNoodle 2 points a year ago

When I ask a server for something, its response shouldn't be "here, you do it."

path: 0 18323731 18324444 18325309 18328936 18329064, hotness: undefined, score: 2, children: 0
petersr 1 point a year ago

What's your alternative for web development?

Server side rendered content can only get you so far.

path: 0 18323731 18324444 18325309 18325828, hotness: undefined, score: 1, children: 6
bilb 3 points a year ago

Webassembly frameworks.

Blazor! But only because I'm a dotnet guy professionally.

Yew? I'm not good enough with Rust to have tried it.

path: 0 18323731 18324444 18325309 18325828 18327773, hotness: undefined, score: 3, children: 4
bhamlin 0 points a year ago

Right? That's the mindset that brought us asp, jsp, and php. JS might be obnoxious, but it's the only viable client-side right now.

path: 0 18323731 18324444 18325309 18325828 18326305, hotness: undefined, score: 0, children: 0
rumba 4 points a year ago

Python is a natural evolution for web development, especially once you're past the fundamentals. For someone with no scripting background, PHP is easier to approach. The syntax is more direct, and basic debugging doesn't require any setup. An error happened on x line is the default behavior.

Python's logging system can be tricky to configure properly if you're unfamiliar with the factory and error level handling. Those green people don't have any idea where to put the log or how to let the web server talk to it safely.

It's the little bs like refusing for years to include switch, then when they finally give, they just refuse to allow fallthrough. It's like they said, fine, but it's got to work slightly differently and we don't like the name... it feels childish.

All things considered, Python has a richer ecosystem and deeper long-term potential. But there's something to be said for how quickly a basic PHP site can be spun up and debugged with minimal knowledge with minimal friction. And that's why it's still around so much today.

path: 0 18323731 18325181, hotness: undefined, score: 4, children: 5
SpaceNoodle 3 points a year ago

I agree that PHP was easy to pick up, but I already knew several programming languages and was quickly shooting myself in the foot with the extremely overbuilt, redundant, and buggy builtin functions. At the time, though, it was either that or ASP, so I chose the lesser of two evils.

To segue, switch statements aren't inherently necessary for a mature programming language; I think that addition was partially to mollify the growing userbase (not a good reason), but on the other hand it's really just structured pattern matching wearing a hat that says "switch" on it ... though again, that's something which could fairly trivially be achieved with a list comprehension. It's not like you're getting the machine-code-level optimizations that a C compiler could churn out for a proper switch statement.

path: 0 18323731 18325181 18325468, hotness: undefined, score: 3, children: 4
rumba 3 points a year ago

I personally feel that giving the growing user base things they want is probably the most prudent reason. Constantly refusing to provide simple constructs that are available everywhere else It's not a good look. In the open source world if you do that shit enough you end up getting forked.

The context and ease of switch in a functional programming layout is a rather clean implementation.

Otherwise you end up with the crap like they're pulling with flask were you just make an unnamed, unindexed number of functions. Can you sort and organize your functions and make everything clean? Sure you can. Does it happen by default? Almost never.

You can walk up to someone else's switch and see what the options are. The code flows through that simple construct and it's very easy to understand someone else's work.

I load up someone else's flask endpoint, It's just this multi-page stream of consciousness.

You don't need switch, But there's a reason why so damn many people ask for it. Before they agreed to include "match", They said just to use getattr and write your own switch.

path: 0 18323731 18325181 18325468 18325798, hotness: undefined, score: 3, children: 3
PolarKraken 3 points a year ago

I think I agree with you, and I also think you probably know better than me, but - Python couldn't become what Python became without doing this exact thing very deliberately, bordering on obnoxious at times. Fundamentals or "initial state" define the characteristic strengths and weaknesses for a language, but what to add and what not to, as well as "why" and "how", over time determine the true shape and user experience (lacking a better word there) of a language.

Despite its reputation, in my view Python has always been far more opinionated about how to do things than most give it credit for.

path: 0 18323731 18325181 18325468 18325798 18333532, hotness: undefined, score: 3, children: 1
SpaceNoodle 2 points a year ago

I guess I should be thankful that they were no longer demanding GOTOs.

path: 0 18323731 18325181 18325468 18325798 18326745, hotness: undefined, score: 2, children: 0
TomMasz 20 points a year ago

It's old and ugly, the worst tool you can use for anything, and unkillable.

path: 0 18320509, hotness: undefined, score: 20, children: 3
x00z 7 points a year ago

You meant WordPress, not PHP.

path: 0 18320509 18323279, hotness: undefined, score: 7, children: 2
TomMasz 1 point a year ago

Joined at the hip.

path: 0 18320509 18323279 18324122, hotness: undefined, score: 1, children: 1
Korhaka 1 point a year ago

Used php for quite a few personal projects without touching wordpress.

path: 0 18320509 18323279 18324122 18328639, hotness: undefined, score: 1, children: 0
josefo 16 points a year ago

It's true that the fuckers that stayed in PHP now are getting paid insane amounts of money to maintain systems? I've heard they are the new cobol people.

path: 0 18322541, hotness: undefined, score: 16, children: 1
LovableSidekick 6 points a year ago

I doubt that the pay is insane yet. There are a lot more PHP devs than COBOL devs. About half of the web still runs on PHP. It's true that COBOL runs about half of the financial world, but PHP is less than 30 years old whereas COBOL programs are relics from decades earlier, and generally only get updated minimally if the systems around them change.

path: 0 18322541 18325349, hotness: undefined, score: 6, children: 0
paulbg 16 points a year ago

bro ive been doing fullstack js dev for severals years to then realize php is superior💀

path: 0 18328324, hotness: undefined, score: 16, children: 13
3x3 5 points a year ago

The only reason php is still alive is Facebook

path: 0 18328324 18328659, hotness: undefined, score: 5, children: 1
blarghly 7 points a year ago

WordPress?

path: 0 18328324 18328659 18336105, hotness: undefined, score: 7, children: 0
MrSoup 5 points a year ago

W-what? Did you used js as backend? How was performance?

path: 0 18328324 18328679, hotness: undefined, score: 5, children: 9
Zos_Kia 7 points a year ago

It's very rare that the backend language significantly affects performance. In 99% of apps you could have the most optimized backend written directly in machine language, and you'd just shave off milliseconds.

That's because in web development most of the latency comes from i/o (network requests, database access, file access), not from computation being slow.

path: 0 18328324 18328679 18333383, hotness: undefined, score: 7, children: 5
buttnugget 2 points a year ago

So why did Facebook build that whole system of converting C++ to PHP or whatever they did? Was it because they didn’t understand the savings? Or when you scale that high, the savings really are significant? Were there savings?

Edit to subtract: https://en.wikipedia.org/wiki/HHVM is what it eventually turned into, and apparently it showed significant improvements even above the previous system.

path: 0 18328324 18328679 18333383 18333542, hotness: undefined, score: 2, children: 4
blarghly 2 points a year ago

Probably because someone said it was a good idea in a meeting.

path: 0 18328324 18328679 18333383 18333542 18336119, hotness: undefined, score: 2, children: 3
PolarKraken 6 points a year ago

Happens a lot - my (quite small) shop was using NestJS for backends and my boss is way more experienced and wise than me. I unintentionally caused us to switch over to Python, which probably sounds as silly as JS to many, but - we deliver dope shit, on time and on budget 🤷‍♂️

path: 0 18328324 18328679 18332134, hotness: undefined, score: 6, children: 0
percent 6 points a year ago

Thanks to web browser development, there has been quite a lot of focus/investment into JS runtime optimizations. Since the server-side runtime environments use those same JS engines, performance tends to be quite good.

path: 0 18328324 18328679 18329179, hotness: undefined, score: 6, children: 0
yessikg 1 point a year ago

From my experience as a user? Not great if you are using a popular app

path: 0 18328324 18328679 18345364, hotness: undefined, score: 1, children: 0
darvit 4 points a year ago

Well better late than never.

path: 0 18328324 18328758, hotness: undefined, score: 4, children: 0
simonced 15 points a year ago

Array_filter and array_map having the arguments swapped pisses me of so much.!

path: 0 18335578, hotness: undefined, score: 15, children: 1
mad_lentil 4 points a year ago

This person phps

path: 0 18335578 18336303, hotness: undefined, score: 4, children: 0
leds 15 points a year ago

Maybe 25 years ago i build my first website for a paying customer ( my dad). I decided to go for php which was new to me at the time.

I figured it would be too risky ( even back then) to have PHP generate dynamic pages so instead I had php generate static html.

So whenever website needed updating , for example a new folder with images was added, you could just load the admin.php and it would generate gallery pages for you.

Would probably still work 25 year later if wasn't eventually replaced with some WordPress or something

path: 0 18323480, hotness: undefined, score: 15, children: 2
Zachariah 15 points a year ago

for many websites, this is the ideal way to do it

makes it order of magnitude more secure

path: 0 18323480 18323602, hotness: undefined, score: 15, children: 1
MonkderVierte 10 points a year ago

And performant. And accessible. And compatible.

path: 0 18323480 18323602 18325060, hotness: undefined, score: 10, children: 0
nicgentile 14 points a year ago

PHP forever.

path: 0 18319162, hotness: undefined, score: 14, children: 2
Pro 24 points a year ago
path: 0 18319162 18319202, hotness: undefined, score: 24, children: 1
sukhmel 2 points a year ago

✍️ we need PHP interpreter written in Rust, noted

path: 0 18319162 18319202 18333453, hotness: undefined, score: 2, children: 0
MNByChoice 10 points a year ago

Yup! Every time we add a new technology, the old does not go away. We just have more (gestures wildly) everything.

When picking a career specialization, don't abandon all the old stuff. Some of it makes a lucrative career after others have moved on (HPC, COBOL, on-site servers).

path: 0 18320097, hotness: undefined, score: 10, children: 0
dreadbeef 8 points a year ago

Js is dead use php!

path: 0 18335767, hotness: undefined, score: 8, children: 0
ryathal 7 points a year ago

ASP.net web forms were ahead of their time. I miss them every time I have to use modern js frontends.

path: 0 18319713, hotness: undefined, score: 7, children: 2
dave 4 points a year ago

Geez did they build that page with asp? Is janky-scroll a default setting?

path: 0 18319713 18320172, hotness: undefined, score: 4, children: 1
bleistift2 3 points a year ago

The page scrolls normally for me.

path: 0 18319713 18320172 18321331, hotness: undefined, score: 3, children: 0
0x01 7 points a year ago

Magic quotes were the single biggest mistake I've ever seen any language standard make.

path: 0 18320011, hotness: undefined, score: 7, children: 1
darvit 2 points a year ago

Those haven't existed in PHP anymore for a very long time.

path: 0 18320011 18328926, hotness: undefined, score: 2, children: 0
XTL 5 points a year ago

Still broken as designed.

path: 0 18319256, hotness: undefined, score: 5, children: 0
Zachariah 4 points a year ago

And I still don’t know what the first P stands for.

path: 0 18323595, hotness: undefined, score: 4, children: 8
Laser 8 points a year ago

If you go by the initial acronym, it means personal iirc

path: 0 18323595 18323748, hotness: undefined, score: 8, children: 7
Zachariah 2 points a year ago

stands for

not: stood for

path: 0 18323595 18323748 18323784, hotness: undefined, score: 2, children: 6
natecox 7 points a year ago
path: 0 18323595 18323748 18323784 18324246, hotness: undefined, score: 7, children: 5
Zachariah 4 points a year ago

Okay, that makes sense.

PHP: Hypertext Preprocessor.

But what does the first P there stand for?

path: 0 18323595 18323748 18323784 18324246 18324274, hotness: undefined, score: 4, children: 4
LovableSidekick 2 points a year ago

Last week I found the code for the first website I created, way back in the mid 90s. The server-side part was written in Perl.

path: 0 18325077, hotness: undefined, score: 2, children: 0
pewgar_seemsimandroid 2 points a year ago

php is too mainstream, give ruby a reason to exist.

path: 0 18323241, hotness: undefined, score: 2, children: 5
GreenKnight23 5 points a year ago

ruby has so many better reasons to exist beyond that.

since v3 it performs just as well if not better than Python.

it has a well documented and lush library of gems that still work even if they are 15 years old.

ruby gets a lot of shit because everyone ties rails in, which has improved, but is still slow as shit compared to other orms.

path: 0 18323241 18323954, hotness: undefined, score: 5, children: 3
tyler 3 points a year ago

yeah rails is literally the only thing giving ruby a bad name, it's terrible. Ruby is a beautiful, amazing language, and then people shit all over it because of Rails. I literally had someone complain that ruby is a horrible language, I asked them what they meant, they listed off all rails things, then I showed them the language and they were like "this isn't what I was using...".

in any case I think you really should only use ruby for very small scripts or programs. Nothing enterprisey at all.

path: 0 18323241 18323954 18324865, hotness: undefined, score: 3, children: 2
GreenKnight23 1 point a year ago

I'm complete opposite. I feel ruby is a far more mature solution compared to what enterprises are using; node, python, (new hot language here).

path: 0 18323241 18323954 18324865 18325902, hotness: undefined, score: 1, children: 1
tyler 4 points a year ago

Most enterprises use Java. Having built many large apps with Ruby and the JVM ecosystem, there’s a reason the JVM is chosen. Same for C#.

Yes, Ruby is way way more mature than node and Python, but most orgs aren’t building backends with those, or if they do they pretty quickly learn why they shouldn’t (been at two orgs that were moving off of node and python).

path: 0 18323241 18323954 18324865 18325902 18331905, hotness: undefined, score: 4, children: 0
MonkderVierte 1 point a year ago

Ruby is as dead as PHP.

path: 0 18323241 18325080, hotness: undefined, score: 1, children: 0

thanks for using Leebra!

go to feed...