338
you are viewing a single comment's thread
view the rest of the comments
[-] phoenixz@lemmy.ca 2 points 1 year ago

From what I've seen is that 99% of the PHP hate is people parroting slogans others came up with, and the rest is that there are inconsistencies with the function signatures.

That last part is very true, of course, but not really an issue with modern editors as they will already tell you what's expected. On the other hand, the inconsistencies are still there for a reason: compatibility. JavaScript what's a nightmare to work with because every week an update would break shit because of changing method signatures in JavaScript packages. PHP always worked and remained working because it changed so little in that respect.

In all other areas it hugely improved and matured over the years, just like all programming languages.

So yeah, I find the PHP hate childish, really.

[-] jvisick@programming.dev 7 points 1 year ago

Honestly, “it’s better than JavaScript” is a pretty low bar.

I don’t like PHP because I think the syntax is ugly and I’ve only used it on systems that are old and a pain to maintain, but I’ll also very freely admit that I have absolutely not written enough PHP to have an informed opinion on it as a language.

[-] phoenixz@lemmy.ca 1 points 1 year ago

True enough on JavaScript but I mention it because people always take that for comparison. I've used it for hundreds of projects now and for me it's become my default goto language because I can slap together anything with it. It now has good (optional but encouraged) type safety, which greatly improves code quality so yeah.. love it

[-] words_number@programming.dev 3 points 1 year ago* (last edited 1 year ago)

PHP grew "organically" out of a perl library. There was never a consistent plan/idea about the set of abstractions it provides, the type system, builtin functions etc.. Everything has been bolted on here and there, some additions good, some bad, some terrible pitfalls. A language with builtin operators that are basically unusable (comparison!) and where some functions return false when the input is invalid, is really fundamentally broken. I agree that many of the worst failures of PHP have been (kind of) fixed after PHP5 and that's nice for large existing PHP codebases (mediawiki, wordpress, nextcloud, typo3). But I just can't understand why one would start new projects in PHP in a world where so many very well designed and well thought through languages exist.

Edit: First sentence is misleading. Of course it wasn't a perl lib, but basically a thrown together bunch of functionality, unified into one package, so it can replace using various perl libraries. The syntax was also very inspired by perl.

[-] phoenixz@lemmy.ca 1 points 1 year ago

Yes, PHPs beginnings were very messy and even today we see results from that.

But PHP was and remains hugely popular because it's so easy and fast to work with and today it is very nicely designed and worked out. Yeah there are many details open but editors help you out with that. Other languages may be more consistent at the core but they have their own issues. JavaScript is a nightmare to work with for me, personally, but I o dont bitch about it every opportunity I get.

I guess I'm just slightly annoyed with people complaining about PHP while it's just another language and it's success speaks for itself

[-] words_number@programming.dev 1 points 1 year ago

Yes, JS is equally terrible! At least we can agree on that :-P

And I also understand that PHP (just like most technologies) can be very efficient to work with if you are used to it and know it very well.

[-] phoenixz@lemmy.ca 1 points 1 year ago

Well, if it comes to web development (my main focus since the last decade at least) I think it's fair to say there is little that nears PHP (or, begrudgingly, JavaScript)in functionality. With current frameworks (my own included) I can churn out highly complicated and fast sites in no time. Can't say that for many other languages.

Java? "Fast"? Lol no. "No time"? Lolol no.

Python? Honestly I have too little experience with it to say, but at least frameworkoptions are much more limited anyway

this post was submitted on 01 Sep 2023
338 points (96.2% liked)

Programming

17314 readers
75 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS