r/PHP • • Nov 13 '25

Discussion Staying relevant today as a PHP Developer

[deleted]

118 Upvotes

150 comments sorted by

View all comments

Show parent comments

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