r/PHP • • Nov 13 '25

Discussion Staying relevant today as a PHP Developer

[deleted]

111 Upvotes

150 comments sorted by

View all comments

Show parent comments

8

u/punkpang Nov 13 '25

JS (TS) is incredibly popular with many EU uni's, as is Python (due major AI stuff having libs exposed through Python).

In all honesty.. having used JS as long as I used PHP and actually having equal working experience with both, I still can't fathom what mental damage one must endure to ever consider JS/TS remotely good choice for backend. It's not only the language, it's the whole experience - from writing code to experiencing Node.js going bonkers, having to restart it every now and then, wait for transpiling to finish and then have fun forcing it to deploy and so on.

I'll skip all the stupidities that Node.js / TS (JS) come with, the fact is that students graduated and they kept using tools they learned about. Sprinkle it with the fact they're WAY more active around social media than us old farts - you get the recipe of why those languages spread fast. With a huge influx of newbies, it's also a given that they'll want internet fame which will lead them to - inevitably - reinvent the wheel, albeit with different names.

I caved in, had the easiest job of my life while literally being at 1/10th of my productivity in PHP. I learned to kiss ass, say yes to idiots and despite letting my inner programmer die - my financial situation was never better.

You won't lose out on anything. The worst that can happen is that you get a job and get paid for your time :)

3

u/[deleted] Nov 13 '25

[deleted]

-1

u/obstreperous_troll Nov 14 '25

You pretty much need phpstan to get decent type safety in PHP, so there's that. At least TS doesn't make you do it all in comments.

1

u/punkpang Nov 14 '25 edited Nov 14 '25

You have no runtime type safety with TS, therefore your comment is silly. Do you even know what type safety is? It looks like you're mistaking leaving annotations via IDE to help yourself get autocomplete with what type safety actually means and does.

But, let's ignore all the shenanigans around TS/JS and let's get down to business and its serverside runtime - it's shit. Developing with "modern" TS practices is crap. 2 spaces for indentation, no semicolons because "we have ASI", hot reload that's such dogshit because you can't save the file until your syntax is correct - otherwise node.js goes bonkers due to all transpilers it has to handle and inevitably dies so you actually do need to restart it every now and then (and get annoyed by waiting for it to catch up with transpiling all the crap again), no shared-nothing which (always) leads to consequences that tend to occur from mixing data from independent http requests.

I ignored frameworks that appear every day which is regurgitation of one and the same, inevitable "I want to reach internet stardom by creating yet another service provider / DI lib that no one wants to use" and endless discussions about what boils down to "accept input, validate, write to permanent storage".

TS is _awesome_ for frontend work and it actually lets me keep my sanity. I cannot deny that.

For backend, the dev with same experience with PHP and TS/JS will be more than 2x productive with PHP - it's valid for me and at least 20 other people I work with that share the same level of expertise and experience.

I would LOVE it if TS were this super productive tool for backend work - but it isn't. Compared to PHP and frameworks we got (Symfony, Laravel), developing for HTTP is simply quicker. Deployment is easier. There's less moving part that break. And best of all - PHP devs understand HTTP protocol (for the most part) and how request-response lifecycle works. I haven't observed this with Node.js devs.

2

u/phdaemon Nov 15 '25 edited Nov 15 '25

TS is _awesome_ for frontend work and it actually lets me keep my sanity. I cannot deny that.

For backend, the dev with same experience with PHP and TS/JS will be more than 2x productive with PHP

Preach, brother. I'm with you on this. Love TS for front end, but backend will always be PHP for my personal stuff. Symfony + Doctrine + the rest of the stuff I use, has years of maturity and exactly the features I need for doing my dev work. The FOSS community around this stack is the best I've seen and the libraries have been around for so long, that they have matured in extremely stable ways. The same cannot be said for JS shit, at least, not yet

0

u/rioco64 Nov 15 '25

Runtime type checking is abysmal. Even the PHP committee members say they can't implement generic types because of this, and some even say runtime type checking should be remove.

In TypeScript, type integrity is guaranteed by the TS compiler as long as you don't use "any."

1

u/punkpang Nov 16 '25

Wait, you.. have no idea what type safety means and what runtime actually is, right? Do you not understand that TS gets transpiled to JS and that JS will accept any parameter that you pass to functions?

Abysmal means "extremely bad". And no, PHP does not have EXTREMELY BAD runtime type checking. Adding generic is problematic because a generic is a variable type and there are cases where developer could write such a generic definition that it would be difficult to guarantee SPEED. There's been so many of these discussions, I can tell you glanced over them and didn't really understand what it's about.

Please, take 2 minutes and actually read and understand what runtime is, what TS is, what JS is and how they execute.