Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

191–200 of 402 posts

Re: I still love PHP and JavaScript

#192
post #56

My favorite PHP feature: NO COMPILATION! Simply drop your new files and voilà - your SaaS is up to date and serving new code!

This also results in easily breaking production.

On the other hand, if your production is already broken, it's much easier and quicker to apply a hotfix in PHP (just edit a file on the server directly) without waiting for the whole CI/CD to finish.

Re: I still love PHP and JavaScript

#193
post #181

Earlier quoted context omitted.

With Python one never knows when a particular feature code depends on will be removed. With PHP code written 15 years ago still works.

What features have been removed from Python?

Besides the obvious 2 to 3 transition, cpython has obsoleted or renamed stdlib modules several times between 3.x versions. For example, the collections.abc change causes several common Linux bits to break if you change the system default to 3.8.

Re: I still love PHP and JavaScript

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

PHP documentation is one of the worst things I've ever seen. That people subject themselves to abuse such as "reading it" is comical to me. Enjoy scrolling down 15 years of comments to get the quick rundown.

Re: I still love PHP and JavaScript

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

I’ve always wondered why the more respectable dynamic languages, like Ruby and Python, don’t have a web framework with the PHP deployment model of “just upload this file to the server and refresh your browser to see changes.”

Ruby did have such a thing, via mod_passenger, and other options were available for different scripting/programming languages.

Back in the day PHP got big because most of the larger shared-hosting sites provided mod_php out of the box, along with MySQL.

If you wanted to run CGI scripts you were probably capable of doing that, whether in Perl or something else, but most of the other options came later or were unusual.

I know when I tried to setup a few sites a long long time in the past I had to get a VPS of my own, with root, to configure Apache appropriately. None of the shared hosting sites would have run the kind mods I wanted to have.

Re: I still love PHP and JavaScript

#197
post #81
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…

Not sure about "no surprises" - just saw this on Twitter yesterday: https://twitter.com/LupinityLabs/status/1554217944179249153

I mean, its PHP - I'm not surprised ;)

Re: I still love PHP and JavaScript

#198
I hardly ever use php, but when I do, I’m always surprised by how good it is. Its the only mainstream progamming language that is specifically designed to make backend web applications, and it really shows.

Re: I still love PHP and JavaScript

#199

My favorite PHP feature: NO COMPILATION! Simply drop your new files and voilà - your SaaS is up to date and serving new code!

in the last decade I don't know when compilation has ever been something I've ever thought about, all modern frameworks for any language just hot code reload for you.

although if you're talking about your deploy process being dragging and dropping files onto an ftp server, not only is that horrifying but it doesn't win out on automating it with any one click deployment tool out there

Re: I still love PHP and JavaScript

#200

Earlier quoted context omitted.

> - 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.

JS is famously backward compatible, what stuff are you referring to?
Post reply on HN