Live data from Hacker News

A look at modern PHP

lwn.net

251–260 of 610 posts

Re: A look at modern PHP

#251
post #215

Earlier quoted context omitted.

You have to understand, all of that is irrelevant! Because PHP is old and shitty, it mixes camel_case and SnakeCase and the order of arguments in the standard library is inconsistent! Bah.

camelCase and snake_case ... Just to avoid confusion

It made me giggle, which I assume was the point.

Re: A look at modern PHP

#252
post #130
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…

Symfony is an outstanding framework and a real pleasure to build with.

The really nice thing of Symfony framework is database schema mapping and migrations, which have compatibility with numerous database systems and provides abstraction layer [0], that among many options of interfaces have quite handy YAML-formatted schema mapping [1]. Nothing extraordinary these days but it is really stable and simple to use.

[0]: https://symfony.com/doc/current/doctrine.html

[1]: https://www.doctrine-project.org/projects/doctrine-orm/en/2....

Re: A look at modern PHP

#253

Earlier quoted context omitted.

- You can't spin up multiple request threads to make concurrent non-blocking queries in PHP You mean that you don't know how to: https://github.com/amphp/amp

It's not built into the language? How can we be sure this project with 2k Github stars won't segfault, memleak, deadlock, or have some other horrible bug [1]? I haven't done full due diligence, but I'm already suspicious. The open tickets don't look good [2]. > You mean that you don't know how to I'm not convinced you found an appropriate answer either. In any case, this should be a language feature. [1] It looks lik…

Don't look at js then.

Re: A look at modern PHP

#254
post #32
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…

> Would Wordpress have chosen PHP if they started today? You could replace "Wordpress" and "PHP" with whatever you want, depending at which point in history this comment is made.

Kubernetes and go for example.

Re: A look at modern PHP

#255

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…

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

Re: A look at modern PHP

#256

Earlier quoted context omitted.

By that logic, nobody needs to write any thing because there's always some "online service" to "do stuff".

I think the logic is that those served by PHP are better served by platforms. Those with advanced needs are going to use a different language. PHP isn't being replaced so much by Python, Go, and Rust as it is being replaced by Medium, Wix, and Squarespace.

As someone who works with PHP reasonably often, I'd say you have a very limited view of what PHP is actually used for in 2020, if you think 3 hosted blog services will replace it.

Re: A look at modern PHP

#257
post #209
post #138

Earlier quoted context omitted.

> With PHP, all the users has to do is to fetch the project files and upload them with FTP to the directory the hoster told them to Let's not idealize things. For moderately complex apps, even back in the days, this falls pretty fast: missing PHP modules in default distro installation, PECL/Pear extensions, hosters messing with the php.ini in bad ways, etc. And now the dependency management and deployement systems pu…

The only issue of that I still encounter is hosters misconfiguring the php.ini, rarely. There is no shell accessible on these servers, it's on the project to include all dependencies. Composer in this world is strictly not for users, but only for developers. That's a good thing.

Oh how I hated the fact that php.ini could change so much of the PHP behaviour... can't say I miss those days.

Also, I don't know about now because I left this ecosystem long ago, but it was very common for apps to bundle their own custom installer scripts (access a webpage, fill a form and so on). Certainly useful for the users but it was never standard and required a lot of work for the developers (and came with their own requirements and bugs).

But I like some of the recent additions to the language. At least the PHP Team keeps up with the competition.

Re: A look at modern PHP

#258

Earlier quoted context omitted.

If putting a job/event into a queue, or writing a log entry is taking so long that you need a separate thread just to enqueue/log that entry, something is dreadfully wrong with your application.

Ironically, the root cause that made me think of that example was AWS. The example was where each SQS call (there could be as many as five) was taking between 50ms-200ms, and logging took another 75ms. The rest of the request processing time was approx 50ms. There's a bunch of other architecture options we could have looked at, but due to the share-nothing nature of PHP, they weren't an option.

... you do know that you can send a response to the client, close the connection and do something else before the process "finishes" right?

Re: A look at modern PHP

#259

people make fun of php all the time... just see the comments in this thread. people forget though that wordpress, drupal, joomla and magento are all written in php and most likely accounts for 70% or so of all the websites online today. php is going to be around despite all the negativity and fanboyism of other languages. you can't go wrong with knowing php if you always want something to fall back on if you need a j…

I am a PHP dev with 12 years of experience. I think I have been unemployed 1 week total.

good to hear that. have an upvote :)

Re: A look at modern PHP

#260

so is PHP worth learning right now? and what is the job prospect looking like? if I study the language for the next few months what is the lickely scenario I will find a career in it.. I actually enjoy and like PHP unlike other people idk what it is about the languauge it looks fun and enjoyable to play with . Plus it's simple and easy opens doors to more complex languages later on down the road

If you want to work at companies like Facebook, Slack, Etsy, etc. then yeah it's fine. If you want to work for podunk company with devs that derive happiness from the language their codebase is written in rather than business success then yeah, go ahead and skip it.
Post reply on HN