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

Programming

13478 readers
1 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 2 years 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?

(page 2) 32 comments
sorted by: hot top controversial new old
[–] hyperlink2236@feddit.it 2 points 2 years ago

Nowadays is only a matter of community and resources related to the language that one can find online. Php lost popularity and gained this image as a bad language, this brings a lot of devs to not use Php without a real factual reason. Is just not cool or they feel ashamed to tell that they work with Php.

If a dev works with typescript is more easy to find a lot of cool and pleasing resources, videos, articles. With php, for the reasons explained above, the stuff you can find it does not feel so cool as other mainstream languages. And here the game start over, for this reason less people use it and so on. This give to the entire php ecosystem a kind of "old" feeling and a lot of young devs just don't like it.

But rarely there are real reasons. With php 8 for sure there are not a lot of reasons to blame the language to be a bad language.

Until a couple of years ago I used to work with the last versions of php and I actually never felt the urges to redactor everything in some other language.

I am sure that php has limits, but in the same way as all other languages have their limits: they are just tools at the end.

Stop blaming php. Blame WordPress instead! :D

But I would ask he opposite question: can somebody make an argument to not use php? From a dev point of view.

[–] lowleveldata@programming.dev 2 points 2 years ago

I joke about PHP being a dead language a lot but AFAIK modern time PHP is actually a pretty decent language. Haven't coded one tho personally.

[–] SmokeInFog@midwest.social 2 points 2 years ago* (last edited 2 years ago)

I'll just say that my first thought when I read the subject line but before clicking into the post was, "Is kbin that old??"

[–] iliketrains@kbin.social 2 points 2 years ago

Modern PHP is quite performant and nice to work with and it's still improving! Also frameworks like Laravel is very established.

When comparing the time when I use PHP and JavaScript, I love the simplicity and versatility of JavaScript but PHP's strongly typed (with runtime support) and object oriented language often make more sense imo.

I think the strong benefit of using JavaScript for backend comes down to being able to have unified full-stack codebases, one language fits all kind of thing.

[–] VerifiablyMrWonka@kbin.social 1 points 2 years ago

Large parts of my particular departments .gov.uk stack are PHP. All modern (8.1+) using established frameworks and to be honest, it's a joy. It's quick to write, easy to understand and very easy to test. The write, run, debug cycle is also essentially instant; although I really enjoy using Go (another bit of the stack) being able to quickly iterate changes is something I absolutely miss when I'm using it.

Laravel + Livewire is some sort of dark voodoo magic. I can write only PHP and have a functioning SPA with push updates and all sorts.

[–] honeyontoast@kbin.social 1 points 2 years ago

There's a sister project at my work that still uses PHP. It did surprise me, but it's very well written and easy to maintain. I reckon php will be around for a while yet.

[–] farizer@kbin.social 1 points 2 years ago (10 children)

I know it sounds childish but PHP is lame as hell same as java. Rust or go would have definitely been a cooler choice. I mean PHP gets the job done, but still....

load more comments (10 replies)
[–] mfz@kbin.social 1 points 2 years ago

As a single developer taking on a passion project you go with what you know.

Also it must have been near impossible to have foreseen the insane explosion of popularity that has happened here the last few days.

Even then if you build something for passion you choose something that make you happy to use, however esoteric or impractical that may be to others, or how it would be perceived. Most probably it was never thought to be exposed in such a massive way, and certainly not as soon after the project was started (we're talking month(s) here).

Anyhow, for this project from the looks of it it is working fantastic.

Personally I've not used PHP for years but now I'm actually intrigued to take a new look at it.

load more comments
view more: ‹ prev next ›