Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

141–150 of 402 posts

Re: I still love PHP and JavaScript

#141

Biggest flaw of php to me is getting paid well and the number of jobs. From the stack overflow dev survey, php devs get paid much less than others. Laravel and php is a beast, super easy to use. All that annoying shit is setup for you. But, how many ppl hire Laravel devs? Job boards are stacked with react, vue etc. Personal use is great though.

Community sentiment means almost as much as technical facts. PHP might be just as capable as Ruby, but the vast majority of devs, especially experienced ones, do not like it, will not suggest it, and will not apply for companies which use it.

So all that’s left is low end wordpress jobs.

Re: I still love PHP and JavaScript

#142
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

Is Hack better than PHP?

Hack does have a lot of great features (some of which have already been ported to PHP, others are kinda impossible for technical reasons), but at this point, it's diverged so hard from PHP that they're separate languages.

If you choose Hack, you lose the entire PHP ecosystem (composer) that could back you up and save you time. The only ones really using it are Facebook/Meta, so it would be a mistake to choose it for a new project, IMO. It doesn't really have a future.

Re: I still love PHP and JavaScript

#143
post #124

Earlier quoted context omitted.

Like a react component?

i dont like react but even in react there is clear distinction, I've found tons of logic within templates of php like from .. anything at anytime could cause anything. Kinda gives me global variable vibes

That's an issue of design. You can't really blame the language for bad programming practices

Re: I still love PHP and JavaScript

#144
post #33
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> - no "unknown unknowns". it's so tried-and-true, there's no surprises This part is laughable. People who have been programming PHP for 20 years (several of them at my company) still routinely discover hidden bugs, quirks or general behavior that is totally unintuitive and nowhere found in the documentation.

For example?

Re: I still love PHP and JavaScript

#145
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

Ah I remember the experience of just dropping files on a server from a long time ago.

I had one web host where magic_quotes_gpc was enabled. Good luck figuring out what the hell is going on with all these extra quotes in your variables.

And I kept looking up how to do prepared SQL statements in PHP, finding the mysqli functions, and then eventually figuring out that mysqli wasn’t available on your average web host with PHP back then.

(Yes it was that long ago. I also think a lot of the hate comes from that era)

I remember the documentation as well, with usually all the gotchas in the comments. Which is great, but there were a lot of gotchas. like, A LOT.

Re: I still love PHP and JavaScript

#146

Biggest flaw of php to me is getting paid well and the number of jobs. From the stack overflow dev survey, php devs get paid much less than others. Laravel and php is a beast, super easy to use. All that annoying shit is setup for you. But, how many ppl hire Laravel devs? Job boards are stacked with react, vue etc. Personal use is great though.

Honestly, this is the biggest reason to not use PHP. PHP Developers are significantly underpaid compared to pretty much all other devs.

Re: I still love PHP and JavaScript

#147
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> - no "unknown unknowns". it's so tried-and-true, there's no surprises I've always been a fan of PHP too; it was my first programming language that I used to build a shipping application, but saying there are 'no unknown unknowns' in a language as quirky and old as PHP is akin to denying the sky is blue. PHP 4 + 5 had so many weird quirks, and they lasted a long time because PHP 7 took so long to ship (note there wa…

All the languages are changing: eg JS, Go stuff we did a few years ago don't work now. It's a not a situation unique to PHP.

Re: I still love PHP and JavaScript

#148
post #44
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> EDIT: why the downvotes? The anti-PHP cult is strong here on HN. List 5 benefits of React and watch your upvotes skyrocket.

It's more like redditors creeping in. The "downvote is not a disagree button" of reddiquette went out the window a looong time ago. People are fast to hit that button and the attitude is seeping in here, harming discourse.

Re: I still love PHP and JavaScript

#149
post #87
post #33

Earlier quoted context omitted.

> - no "unknown unknowns". it's so tried-and-true, there's no surprises This part is laughable. People who have been programming PHP for 20 years (several of them at my company) still routinely discover hidden bugs, quirks or general behavior that is totally unintuitive and nowhere found in the documentation.

But genuine question -- what other languages are as simultaneously as useful AND predictable?

Python covers many of the same use cases and is much more consistent/predictable. TCL if you want to go back a bit further.

Re: I still love PHP and JavaScript

#150
if you are getting shit done then that is all that matters - but it is hard to find a compelling reason to start with PHP these days unless 1. you are constrained to commodity godaddy-esque cpanel hosting or 2. you have an entire team of PHP devs.
Post reply on HN