Live data from Hacker News

A look at modern PHP

lwn.net

451–460 of 610 posts

Re: A look at modern PHP

#451

Earlier quoted context omitted.

Some people simply have reasonable standards. I tried for years to hire a PHP dev. I never found a single one. I found tons of people who had PHP on their resume, and not a single one of them was anything close to competent. PHP only makes hiring easy if you don't care about the quality of work that gets done. I can hire a million PHP monkeys, but everyone who has the right combination of intelligence and conscientio…

You can hire "good programmers" and ask them to write PHP - Facebook does

No, facebook doesn't. The good programmers facebook hires don't work on the legacy PHP code. They do stuff like sigma. Also, I am not describing a problem, I am pointing out that their perceived problem doesn't exist. If I can hire a good programmer and make them write PHP, I could also hire the good programmer and let them write in a tolerable language, so the mythical "its easy to find PHP devs and impossible to find anything else devs" claim is out the window.

Re: A look at modern PHP

#452
post #271
post #152

Earlier quoted context omitted.

> Would I use PHP if I was starting out today? Unlikely, but I know PHP inside out and can wield it to my wicked ends with ease so won't be dropping it anytime soon. So just out of curiosity, if you hypothetically did start learning web development today from scratch, what would you spend time learning instead of PHP?

When I started I struggled with browser inconsistencies. Over the years Javascript has come a long way and whilst I'm not 100% sold on node.js, I like the idea of using the same language across front and backend so likely would have gone down that road.

There is plenty to dislike about javascript but modern versions are really quite nice. We're about to ship our first node backend having been largely a django shop up until now. There is loads to miss about django and python, but it is so nice to not have the context switching between languages and paradigms. It may not be for everyone, but if you're doing modern web, I think the starting point has become javascript everywhere, and then moving away from that on a use-case basis.

Re: A look at modern PHP

#453

Earlier quoted context omitted.

Many employers use php because it allows keeping salaries down, though. So your advice would not work for those.

The parent post complained about the quality not salary level of PHP programmers, though. The parent wants a quality PHP programmer, you want to keep salaries down - there is an acceptable tradeoff, somewhere.

The parent poster didn't complain about anything, he pointed out the flaw in the grandparent poster's claim.

Re: A look at modern PHP

#454

Earlier quoted context omitted.

I'm in a similar boat. I've decided that whatever it is that makes PHP successful must be exactly the same thing that has made JavaScript successful. It's going to sound extremely condescending, but here it is, anyway: I believe that the majority of people who defend PHP (and JavaScript) are people who have ever only written code in Java (especially <=1.6), JavaScript, and PHP. Maybe C for fun or in college. In light…

Yes, that did sound condescending. I'm both a defender and detractor of JavaScript. I'm mostly a detractor of PHP, but could possibly defend it once in a while if I see misinformation. Peter Norvig at some point came to the realization that the deficiencies of Python relative to Lisp were not deal-breakers, and I don't think that stemmed from his limited experience.

Perhaps it was condescending, but it was, first of all, not intended to be malicious. I have had the luxury of having used a lot of programming languages for various projects. The first N years of my career, I used mostly C++ and Python. I didn't like Python much and was pretty convinced that C++ was the pinnacle of programming languages.

Since then I've done (real, professional, for-profit) projects in PHP, Go, Java, Kotlin, Swift, Rust, JavaScript, Elixir, and Clojure.

So when I work on PHP and Java I can feel what they're missing. It's simply the luxury of having experienced working in (what I consider to be) better languages. Clojure and Elixir were not my cup of tea, but I still find them to be better quality languages than JavaScript.

I have met many developers in my life. Some with quite a lot of experience. The VAST majority of them have only ever worked in a handful of very similar languages. Mostly the ones I listed originally (I forgot C# in the list, but that's more-or-less Java++). If I'd only ever used PHP and Java I would literally not know what a good type system looks like. It's ignorance, but not stupidity.

And I'm talking about people I have much respect for. People who I acknowledge are smarter than me. That doesn't mean I don't know anything they don't, though. And if they've only used PHP and Java, then I know some things they might not. That's all.

EDIT: Also, I'm not sure what Peter Norvig has to do with it. I bet he doesn't like PHP, either.

Re: A look at modern PHP

#455
post #346

This may sound hurtful but hear me out - One thing worth mentioning why someone would not want to use PHP in 2020 is that a PHP programmer is looked down upon by other programmers. And im saying this without hate or malice. I love PHP since I was a PHP dev from 5.2 - 7.0. I built PHP libraries and WordPress plugins that have helped many people. Ive since moved to Node because PHP jobs have dried up in my country. PHP…

In fairness the wheel has turned and node developers are seen as not respected. If you haven't moved to go/rust/serverless by 2018 the cool market has moved. When I got started in 2000, php developers weren't as smart as perl developers. Then it was asp. No serious business would use php over asp. Java developers always had this attutiude but they were always treated as second class from c++ developers who were treat…

I think you forgot the "ColdFusion" crowd looking down on PHP too... :)

Re: A look at modern PHP

#456
post #112

The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN. Here are some facts: - Symfony was the backend framework with the most contributors in 2019 [1] (yes, out of any backend framework written in any language) - PHP has more active contributors than it ever had [2] - Laravel is one of the most used frameworks in the world…

>And last, people compare it to languages like Rust or Go since they consider those are "innovative" No, they do not. The entire appeal of go is that there is zero innovation at all. It is the most plain, boring, ordinary language around. It does absolutely nothing different or neat or new or special. Instead, it focus on being simple, easy and fast. Just like PHP apologists keep claiming about PHP. The difference is…

you are claiming the developers of PHP are incompetent? bold claim, coming from a throw away.

Re: A look at modern PHP

#457
post #272

Earlier quoted context omitted.

Can't speak for others but I've worked on many legacy PHP codebases over the years, it has never been a pleasant experience. Even when it's a PHP 7 codebase the same bad practices from PHP 5 and earlier are all present and accounted for. As are the subtle bugs stemming from an inconsistent standard library and PHPs approach to error handling. I'm sure that there's plenty of good PHP code out there, maybe I've just be…

Ya? Can't speak for others but I've worked on many legacy C++ codebases over the years, it has never been a pleasant experience. Even when it's a C++ 17 codebase the same bad practices from C++ 11 and earlier are all present and accounted for. As are the subtle bugs stemming from an inconsistent standard library and C++'s approach to verbose error handling. I'm sure that there's plenty of good C++ code out there, may…

No? What you said makes no sense. C++ library is consistent, and the error handling is via exceptions, which means not verbose at all, for most cases.

For C++, you want to complain about unreadable error messages, long compilation times, verbose type declarations, and use-after-free bugs.

Each language is different, and has a different trade off. A good developer can use multiple languages: C++ when you have lots of non-trivial data processing, Python for numeric and complex scripts, bash for bootstrapping and simple scripts, and so on.

Re: A look at modern PHP

#458

I wonder if most developers that trash on PHP for trivial issues like seen in this thread haven't been using it for many years, or had a bad experience (e.g. maintaining a legacy app). Some developers live in a kind of technical vacuum where, I guess they assume, the technical features of their programming language are what makes the difference in the value of the business they're building. In reality, the difference…

I'm a PHP "hater", so take this for what it's worth. You are very close to implying that the language doesn't matter if you can hire developers and there are a lot of good packages in the ecosystem. Having worked on several PHP projects (Most being version 7.0+ and zero of them being older than 5.3), the languages is STILL full of gotchas, and it's a huge drag on productivity. I assert that this DOES matter. Even bas…

RE: string -> int, I'm not able to replicate this.

https://repl.it/@JadoJodo/SelfreliantEdibleUsers

edit: Not trying to discount your feelings overall, but just curious about that specific example.

Re: A look at modern PHP

#459
PHP is great. Nothing comes near as close when you just want to shit some SQL-queries onto a page, or add some basic interactivity. Just drop your scripts in /var/www and let apache do the rest. It's like magic.

Re: A look at modern PHP

#460
post #112

The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN. Here are some facts: - Symfony was the backend framework with the most contributors in 2019 [1] (yes, out of any backend framework written in any language) - PHP has more active contributors than it ever had [2] - Laravel is one of the most used frameworks in the world…

>The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN.

What if the assumed quality is an illusion and every discussion is actually as misinformed as this one, you just lack the knowledge to recognize it? Which doesn't have to be a bad thing since the signal to noise ratio on hn can still be better than somewhere else.

(There is actually a name for this idea, I am unfortunately unable to find it.)

Post reply on HN