Live data from Hacker News

A look at modern PHP

lwn.net

271–280 of 610 posts

Re: A look at modern PHP

#271
post #152
post #81

I've been using PHP professionally since ~1999. I remember ripping the Perl fanboys in the early 2000's until the foundations of PHP started to crumble with what are issues that stick in peoples minds today; so I do wonder if we brought it on ourselves sometimes. But PHP moved on carefully to preserve backwards compatibility. I still have a SaaS first developed back in 2005 on the latest version of PHP that's happily…

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

Re: A look at modern PHP

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

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

Re: A look at modern PHP

#273

Earlier quoted context omitted.

no PHP framework is similar to the thing that NextJS/Reactis doing. The output is the same (well, isn’t the point of web framework is to spit out HTML?) but the methodology is totally different.

And about 100x more complex and fragile.

Not at all. I have worked with both for a long time and I can clearly see the differences. They are used for different purposes. The people comparing any PHP frameworks to NextJS have not been very experienced with frontend development, IMO.

Re: A look at modern PHP

#274

Earlier quoted context omitted.

still, no proper multithreading, in comparison with Java, C#, Elixir...

Define proper please.

No native support for concurrency operators, no real event loop implementation, lack built-in support for non-blocking IO... I do Elixir regularly and Actor Model is not something PHP developers know

Re: A look at modern PHP

#275

Earlier quoted context omitted.

> This is absolutely not the case, and you know it. Almost every language has a wealth of HTTP tools and frameworks, and many of them come built-in. Lots of languages have HTTP tools and frameworks, but not many of them are even comparable in scope to Symfony or Laravel. Out of curiosity, can anyone point me at some frameworks in other languages that have the following things built-in? * Route matching and dispatch *…

Ruby on Rails. Django. Revel. Actix.

Phoenix too

Re: A look at modern PHP

#276

I've been programming in PHP since 2007 and I absolutely love it. I've long ignored the hate for it here. I worked hard and followed best practices to get good at PHP. In 2015, I started writing "projectionist" software in PHP to completely automate my home theatre. I was a projectionist at three different theatres for about half a decade. I spoke with old-timers to really get it right and have been tweaking this scr…

This is fantastic! Do you have a code repo somewhere?

Re: A look at modern PHP

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

PHP isn't being replaced by Rust or Go. It's being replaced by Medium, Wix, and Squarespace. At this point, the predominant reason it's still undergoing active development is that there is a metric ton of legacy PHP code. As the businesses still using it either mature, evolve, or fail, the need for PHP will begin to dry up. You're defending the language from an emotional standpoint. > choosing php for a new project i…

> PHP isn't being replaced by Rust or Go. It's being replaced by Medium, Wix, and Squarespace.

Funny that you mention Squarespace as replacing PHP when they themselves are a big PHP shop.

Re: A look at modern PHP

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

I have a love/hat relationship with Symfony but it is a a very well run project, the attention to developer experience is very underrated.

Re: A look at modern PHP

#279
post #169
post #130

Earlier quoted context omitted.

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

I've moved on from PHP some 5 years ago. I'm not missing the language. But damn I'm missing Symfony! I prefer Scala to PHP, the language is much more expressive. When you want to replace a bit of core functionality, in Symfony, you extend the desired class, add it to the dependency injection container, and you're done. In the Play framework, I once wanted to make a one-line change to the routing. When it turned out I…

This is exactly my experience as well. Moved from PHP to Scala about 6 years ago.

Symfony is absolutely amazing. For example, you can import a UserBundle from github, extend the original service class, change a couple of lines and then you have a fully functional user auth system without to rewrite/wire a bunch of things.

Although I don’t enjoy writing PHP anymore, I do miss how mature it is.

Re: A look at modern PHP

#280

Earlier quoted context omitted.

Try Prestissimo, which enables composer to download packages in parallel composer global require hirak/prestissimo

The dependency solver is what is slow, not so much the downloading.

Also doing a composer update in a container with not much ram is sometimes properly impossible. Although that may have changed with the recent 2.0.
Post reply on HN