Live data from Hacker News

A look at modern PHP

lwn.net

311–320 of 610 posts

Re: A look at modern PHP

#311

Earlier quoted context omitted.

Generally lower quality talent. That's half the reason PHP got its abysmal reputation. Brilliant programmers using PHP must be annoyed that they're thusly tarnished. I suppose that's not so different from JS. To the flames with both of them, though, I find them genuinely depressing languages to work with.

> Generally lower quality talent. Which is totally fine btw. Most work isn't "we're engineering a new motor for a F1 race car", most work is "this car's motor is broken, replace it". You don't need a CS degree and brilliance to write code that deals with databases and APIs, which is the super majority of code. You need smart people that spend a lot of time on difficult problems to create strategies that are easy to f…

>> You don't need a CS degree and brilliance

PHP does a terrible job of weeding out the terrible hack programmers. For some reason, people have no problem going into a PHP codebase and monkeying around with it, where something like Rails or Java will at least intimidate them and make them think twice.

Re: A look at modern PHP

#312

Earlier quoted context omitted.

The article says those features are from PHP 5: When objects were first introduced in PHP 4, the implementation was essentially an array with function references and was horribly problematic. The fundamental problems of that implementation were thankfully addressed with the release of PHP 5, featuring an entirely rethought object implementation. In the versions that have come since, up through version the current 7.4…

I accept it mentions that in the content, I guess its the title I find misleading. You can see on this very HN thread, lots of confused replies are falsely equating those features as new developments. My simple point is that PHP has been "mature", in OOP terms anyway, for at least 10 years now, so the original author tying that milestone to PHP 7.4 seems weird and outdated to me.

> I guess its the title I find misleading.

This meme of people on HN judging articles entirely on their title really needs to die.

> My simple point is that PHP has been "mature", in OOP terms anyway, for at least 10 years now

You keep saying that and I keep replying that nobody was ever arguing otherwise.

> so the original author tying that milestone to PHP 7.4 seems weird and outdated to me.

Again, they wasn't. You just assumed they did; presumably because you just read the title and the pre block and skipped over all the rest of the content.

Re: A look at modern PHP

#313
post #14

Even with PHP7, PHP still feels like it is playing catch up. There is nothing new or revolutionary in PHP7, just adopting features present in other major languages. Adopting as other newer languages like Go and Rust seems to be moving beyond those features. A catch up into a world that's on its way out, if one will feel so blunt. PHP's raison d'être remains its ease of getting an instance running on a webserver. But…

Well, Rust is playing catch up with the "change code and run" speed of PHP.

Re: A look at modern PHP

#314
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 only other 2 stacks to which I can compare it are the Spring stack of Java or .NET core

Why not Django or Rails?

Re: A look at modern PHP

#315

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…

I've done plenty of PHP programming (including modern) in the past. I'm excited about recent developments.

Not sure about the productivity claim. I once wrote from scratch (frameworks excluded) backend and frontend (version 1) of a multi-tenant, cloud-based video-sharing platform with PHP as the backend (aws cloud) in a matter of weeks.

I once wrote, from scratch (frameworks excluded), an entire backend (and front-end) of version 1 of a hybrid mobile app (backend in PHP) for a medium-size logistics company in a matter of less than 2 months.

I have other examples, but life is too short trying to convince "haters" that they might not be 100% correct.

I was the only developer on both of those projects. Your mileage may vary :)

Re: A look at modern PHP

#316
post #293
post #285

Earlier quoted context omitted.

Facebook writes Hack, which is nontrivially different from PHP, and those differences matter.

I doubt that Facebook tries to hire Hack devs off the street. No one uses Hack except FB. They hire PHP developers and teach them Hack in boot camps. The point being, you can hire good php devs.

Facebook probably just hires super bright developers, not PHP developers per se. Those developers can pick up Hack in a couple of months.

Re: A look at modern PHP

#317

Earlier quoted context omitted.

Thats hot patching, not reloading as I've come to know it in the web development world. Hot reloading works the same for all languages I know, which is a hardcoded port pushing notifications to clients that they should reload the browser. The client is mostly a js library or a browser plugins. Either works. I know it's also used differently in some contexts, but they wouldn't apply here as far as I can tell. There ar…

You're entirely missing the point by focusing on why someone may or may not have used the wrong words - with an application written in many other languages, you have to do something special to be able to update some server-side code and have that new code be run when you next hit the server.

If pointing out that he's using the wrong technical term is 'missing the point', I'm not sure there was one to begin with.

most examples of why php is so easy to deploy show it with hello world examples you'd never encounter in the wild.

yes, you can edit the php code directly on the server that is executing it. just like with python, nodejs, ruby ... and even java if you're not worrying about scalability.

there is really very little difference if you ignore the fact that it gets hard with the codesize and the environment in which the service is deployed in. the language is almost always the smallest challenge.

and fwiw, i'm definitely not "against" php in any way. i think ssr script languages are wonderful for easy development - especially if you combine them with something like intercoolerJS for interactivity. extremely easy to get started and you're even able to make ssr-"components" by just fetching each segment separately, which isn't really any overhead with HTTP2 nowadays.

Re: A look at modern PHP

#318
post #127
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…

I'd assume that Django and Ruby on Rails can't be that far off.

[deleted]

Re: A look at modern PHP

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

Go and Rust were designed for other things... why wouldn't you compare it to the big language that was actually designed to compete in the same space as PHP? NodeJS. Front end devs are already programming in JS, so there's less adoption cost than PHP. I can't think of a single reason to use PHP over Node (I know both, and have delivered projects in both). The comparison to .Net and Spring makes me think you might be…

Node developer here, but... two notes about your comment concern me a little.

1. "I can't think of a single reason to use PHP over Node" this is fine but can you think of a single reason to use Node over PHP. Is adoption cost the only one?

2. "you might be a bit behind the curve" while the original commenter was talking about PHP being "modern" and dimissing talk of it existing because of legacies, criticising someone for being "behind the curve" does smell a lot like that "must jump on every shiny new thing regardles of merit" mentality that drives a lot of the JS ecosystem. What are the material benefits of being on or ahead of the curve in this case?

Re: A look at modern PHP

#320
post #297

Earlier quoted context omitted.

Facebook poured loads of money/time into HHVM. While I'm sure PHP also got benefits, your "Otherwise it would probably on life-support right now. " argument fits perfectly on the rest of the biased unsupported arguments.

I used PHP in v4/5 times and had the impression development slowed down until I heard about all the "FB being bullish on PHP" announcements.

php 7.0 has been released 5 years ago, I think it's about time to stop using php5 as an argument for anything related to the present state.
Post reply on HN