I have this opinion of PHP. I don’t use it, and I look for alternatives when I find something that does what I want that’s written in it.

Your callout is fair though. I’m not going to switch or anything. I’m happy with my favored scripting language. But I’ll try to not be dismissive of projects that are written in PHP.

Rikudou_Sage
link
fedilink
English
11Y

If you want to check some modern PHP code, you can check some pieces of mine (this project in particular could have a little cleaner code, but I think it demonstrates well what modern PHP can look like):

xigoi
link
fedilink
11Y

Your examples are ironically a great showcase of what I hate about PHP. Java-style object-obsessed programming with long names, piles of design patterns and dozens of imports, along with C-style syntax and dollars before variable names.

Rikudou_Sage
link
fedilink
English
11Y

Java-style object-obsessed programming with long names

I mean, unlike Java, you can do procedural or functional (the support is getting better but I wouldn’t call php the best language for functional). I personally love object-oriented design because it’s the best (IMO) for large projects.

C-style syntax

That’s a feature in my book, I almost exclusively write code in C-style languages and it’s really easy switching between them. The only exception for me being Go.

dollars before variable names

That’s just such a minor detail to hate language over. I like them (probably because PHP was my first language so I got used to them), but I don’t quite care when I’m switching between languages.

Create a post

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



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog