this post was submitted on 16 Jun 2023
64 points (100.0% liked)

Programming

13375 readers
9 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
 

I don't know if it's due to over-exposure to programming memes but I certainly believed that no one was starting new PHP projects in 2023 (or 2020, or 2018, or 2012...). I was under the impression we only still discussed it at all because WordPress is still around.

Would a PHP evangelist like to disabuse me of my notions and make an argument for using PHP for projects such as Kbin in this day and age?

you are viewing a single comment's thread
view the rest of the comments
[–] l3mming@lemmy.fmhy.ml 7 points 1 year ago* (last edited 1 year ago)

I was fortunate enough to meet Rasmus Lerdorf (PHP founder) long before I became a PHP programmer. At the height of the PHP hate back in the early 00's Rasumus was bravely giving a talk to a group of us stuck up Perl programmers.

To be fair, we had good reason. PHP had borrowed lots of functions from C for familiarity (all those str* functions) and done stupid things that made life unnecessarily difficult, like naming some of them with underscores and others without, and making parameter order inconsistent across similar functions. So it did all these C like things but, it did them way, way slower.

Not only that, PHP also wanted to be like Perl because perl was also a bit like C but did things quickly and parse just about anything you could throw at it. So PHP also shoe-horned in a bunch of regex functions to give perl-like capabilities to their pile of poo. So now it also had perl capabilities, but was performing way, way slower than perl.

PHP was like that try-hard kid at school that everyone pretended not to know.

But, on top of it all, Rasmus was very apologetic for what PHP had become. He said to us that PHP was never designed to be a programming language. It was designed to be a "Personal Home Page" templating tool. But soon people wanted to conditionally include bits of templates. Then they wanted to iteratively include bits of template, and then he learned about lex and yacc and rewrote the whole thing and then, one day, there it was. Hideously ugly and Turing complete. And, when he said all this suddenly it all made sense and we had a whole lot of sympathy for where it and he was at. He went on to say that they were putting a lot of working into looking at the worst bits of PHP and making things better. And, credit where credit's due, that''s exactly what he's done. PHP today really is a nice language to work with.