Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

221–230 of 402 posts

Re: I still love PHP and JavaScript

#221
post #201

I love other devs shitting on PHP in my area. The more PHP work they forgo, the better for me. Less guys doing it, always in demand. Making good bank and am quite good at using it.

there's still thousands of low quality entry level devs that will always be there to drag down the salary range for you, don't you worry that

sucks on the hiring end too. I'm willing to pay but don't know how to weed out the cruft. building something with a full ux mock and prd anyone can do. actually figuring out the requirements and then so building that... seems harder to find

Re: I still love PHP and JavaScript

#222
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.”

Python and Ruby have more startup overhead than Perl and PHP, so usually you don't want to pay that cost for every request.

Edit: Not sure why this is controversial. Here is a "hello world" benchmark I just ran on my machine, in units of hello worlds per second: Perl – 1020 runs/second; Python – 78 runs/second; Ruby – 30 runs/second.

Re: I still love PHP and JavaScript

#223
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

Yet when you go through the thread exactly same issue - float rounding happens in many other languages.

There are better examples of PHP being bad.

Re: I still love PHP and JavaScript

#224

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

What websites are you working on that have 10+ people? In my nearly 25 years working as a web developer, I don't think I've ever worked with more than three other developers at one time.

actual webapps can have hundreds of SWEs

Re: I still love PHP and JavaScript

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

Being a PHP programmer for 14 years never found an example of that.

Re: I still love PHP and JavaScript

#226

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

hella legacy js and php is the opposite of intertwined by it's very nature. every page is isolated. one php file per page. probably some inline js script tags. easy refactor.

and if they're actually using frameworks and libraries.. well that's just being a good programmer. if you don't know how it works, leave it alone and go rewrite a piece that doesn't require rewriting something core

Re: I still love PHP and JavaScript

#227

I think that php has some weird disk usage behaviour that makes running Wordpress in a docker environment slow. I don’t know exactly what it is but I would say it is a weird behaviour of php anyway.

Wordpress is just bad. PHP is leader in CMSes but the old ones Wordpress, Drupal have to support so much legacy stuff. Including wierd patterns hand hacks from the past.

Modern CMSes like Craft, Kirby, Twill, Bolt, October… it is very different story.

Re: I still love PHP and JavaScript

#228
I don't love PHP, but it gets the job done on my ISP, I upgrade it when I need, occasionally get to learn a couple of new features.

JavaScript, if we are talking about VanilaJS and script tags, great, everything else I can happily ignore.

Re: I still love PHP and JavaScript

#229
post #162

Earlier quoted context omitted.

I’ve been using PHP since 2003 and it’s my full time job and this doesn’t ring true. Very, very rarely is a gotcha not in the docs comment section.

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_filter() without a callback to cull nulls.

Re: I still love PHP and JavaScript

#230

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.

There is one main reason devs get into PHP. Content management systems. People here forget how many developers create content websites not products. PHP is pretty massive leader in CMSes. And i dont mean legacy stuff like Worpress. Most modern ones are essentialy light MVC framework with admin panel. Many are even based on Laravel.

So by doing CMS dev you end up with pretty good skills with php+MVC. Why not use it for webapps?

Post reply on HN