Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

351–360 of 402 posts

Re: I still love PHP and JavaScript

#351
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…

First 10 years of my career were heavy PHP. I’m solidly into Ruby and Elixir now, but I completely agree with you on the perks of PHP. People love to hate on it. https://www.brightball.com/articles/no-such-thing-as-real-pr... (Old article with a lot of dead links now, just FYI).

Reposting that made me realize I needed to fix my old URL redirect logic, so I did and the dead links work now.

Re: I still love PHP and JavaScript

#352

Earlier quoted context omitted.

They do. It's just that everyone seems to have collectively decided that cgi shouldn't be used anymore.

CGI has become "serverless" and it's hyped up to no end. The more things change, the more they stay the same.

With the crucial difference that "serverless" is proprietary and uses different APIs, so you can't just go to whatever hosting company you want.

Re: I still love PHP and JavaScript

#353
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…

then take my upvote, I agree 100%, I'm saying exactly this to many people and they just roll their eyes (to be fair I don't use PHP anymore but I certainly don't share the despect which others have)

fun thing I also wanted to add a point about documentation but you did it yourself, life is fun sometimes :)

Re: I still love PHP and JavaScript

#354
post #162

Earlier quoted context omitted.

That’s just it. I have to code with the PHP docs open like some kind of arcane recipe book.

Maybe it’s the frequency that you use the language? I go maybe 5-10k loc between needing to lookup anything in the docs at all, and 5-10x that where the issue I need guidance on isn’t in the formal doc. Much more frequently I’m looking up something related to the tools and libraries I’m using. The only surprising thing I’ve learned about PHP at the language level in the last 6-10 months is that you can call array_fil…

It could be, but I also never felt like I really got to the point you're talking about in 2 years or so of moderate usage. I've been productive in it, and it's not like I'm hung up on control flow or something. I don't hate the language either. I still have to use it from time to time, but it just doesn't seem like it makes sense for a lot of green field work due to this.

It's mostly things like parameter order for certain built-ins that aren't intuitive and/or finding built-ins I've never used or heard of because there are so many obscure ones (there are nearly six thousand) that keep me coming back. For example, how do you disable errors in a DOMDocument? It ought to be as easy as DOMDocument->setAttribute("errors", "false"), but no it's a separate function call to libxml_use_internal_errors(true). There are like five other similar function calls for this too. PHP has abstraction leaks and little inconsistencies like this everywhere.

Granted, languages with small standard libraries, like JavaScript, by contrast get an easy cop out to blame the community of various package maintainers here. But at least in that case someone can always just write a better library.

Re: I still love PHP and JavaScript

#355
post #309

Earlier quoted context omitted.

> PHP was really nice to get into programming and make a spaghetti website Facebook manages quite well with PHP. Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now.

>>well-documented Sources?

https://phptherightway.com

Re: I still love PHP and JavaScript

#356
post #309

Earlier quoted context omitted.

Have you tried a more "modern" language recently? By trying I mean using it for more than 6-10 months. I've been one of the PHP "supporters" until I've found Go and Rust. PHP was really nice to get into programming and make a spaghetti website but the language itself and the ecosystem always felt like a hacking project. The killer feature of PHP has always been the hosting ecosystem. A simple FTP upload would do the…

> PHP was really nice to get into programming and make a spaghetti website Facebook manages quite well with PHP. Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now.

>> Facebook manages quite well with PHP.

I didn't say you can't make it work. You can build great stuff using just bash scripts. I'm pretty sure you can have success with any programming language. That doesn't mean it's the "best" way to do it.

>> Maybe it's your fault you didn't learn how to use modern PHP practices which have been well-documented for over a decade now

I doubt it's my fault. I'm not "special". I think PHP is prone to bugs and bad practices both due language design and bad documentation.

Re: I still love PHP and JavaScript

#357

> I love legacy codebases. > A legacy codebase means that the product is performing well. It means that I can often make immediate and impactful improvements. Wow. This person must have worked on very different legacy codebases than me. Legacy Javascript code, to me, is something that I do not want to touch with a 10 foot pole, because every little piece of it can be intertwined with and used by many other hidden pla…

They said impactful champagnes, and that the product is performing well. Nothing in your comment contradicts that.

champagne, ey? :D

Re: I still love PHP and JavaScript

#358

Earlier quoted context omitted.

CGI has become "serverless" and it's hyped up to no end. The more things change, the more they stay the same.

With the crucial difference that "serverless" is proprietary and uses different APIs, so you can't just go to whatever hosting company you want.

Of course, vendor lock-in is a feature because once developers leave a company, someone else with the necessary proprietary knowledge needs to replace you. Spread proprietary cloud stuff like the plague and you'll always be employable somewhere!

Re: I still love PHP and JavaScript

#359
post #326

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.

I'm a PHP dev, I didn't take part in StackOverflow survey and ~15 senior PHP devs that I know personally didn't take part either. Judging on such a small sample, I'd be guessing that it's safe to assume that survey is missing crucial data from people who do get paid well. I'm 22 years in the business, 16 years working at the same place. At this point, there's various bonuses next to salary. After so many years, it's…

That's how sampling works, not everybody writing Java, Go, or whatever else is filling out surveys, either. I know I haven't.

I haven't looked recently, are there a lot of remote positions for US employees writing PHP for $200k+ base plus bonuses?

I'm not even talking about the crazy-high comp from FAANG companies here, just Principal developer roles paying more than $200k base, with bonuses as well.

My anecdote and your anecdote combined don't make data, of course, but I know my comp climbed pretty dramatically when I left PHP behind.

Re: I still love PHP and JavaScript

#360
I feel like Emberjs is the PHP of JavaScript frameworks. People looove to BS about it with no apparent reason.

I mean, everyone knows tech is moving fast. Especially the JS ecosystem. So now why are you talking sh*t based on your experience like 3 or 5 years ago? At least just go around and read more before you comment.

Post reply on HN