Hacker News new | ask | show | jobs
by muglug 2129 days ago
There's been one big change in the last 5 years – the adoption of type-inferring PHP static analysis tools in CI.

As companies started adopting TypeScript/Flow into their Javascript pipeline, PHP developers realised the need for something similar in their ecosystem.

I work at Vimeo (which has a lot of business logic in PHP) and I took it upon myself to write a static analysis tool (which you can play with at https://psalm.dev). Other similar static analysis tools were developed at other places that use PHP, and together they have helped make modern-day PHP development a little more orderly.

2 comments

Thats pretty rad.

I'm curious if you guys use PHP at all for any real time workloads. Thats where I've always had struggles with PHP.

Also, have you found the event dispatch system of the modern PHP frameworks to be slower over time?

I've used PHP in a realtime setting as part of Psalm's Language Server, but it's clearly not built for such workloads – the lack of native async support gets in the way.

If most of the stuff you're doing requires an event loop I'd consider other options before PHP, but if it's mainly serving web requests PHP is my go-to.

Your example is similar to a WordPress developer saying they adopted modern PHP - sure, they were on PHP already. But at least Vimeo still wanted to stick to PHP so that's one positive point.