Hacker News new | ask | show | jobs
by tambourine_man 2129 days ago
PHP is seeing a renascence and renewed interest similar to what happened with JavaScript a few decades ago.

A language that's easy to make fun of but widely used is an attractive target for improvement.

4 comments

Maybe I'm not in the right circles but I see absolutely no renewed interest towards PHP. Is there any reason to believe that? Honest question - PHP was my first language (or second if you want to consider mIRC scripting) and I have not so bad memories but at least me and everybody I know moved away from it years ago and don't see people going back to it anytime soon.
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.

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.
Symfony was the backend framework with the most contributors in 2019[1], and Laravel is seeing some huge growth in the PHP community. I think there's a lot of hype for the modern improvements in the language, and it's quite easy to manage a stateless web server in production making it a safe technology to use.

[1]: https://symfony.com/blog/symfony-was-the-backend-framework-w...

Doesn't make it the best backend framework of 2019!

In all seriousness, I think this has more to do with the ease of PHP development comparatively to other stacks. Even Python (arguably just as easy to learn as PHP), has more overhead here.

For context for talking off the cuff, I’m not certain that this equates to a raw quality, having used Symfony professionally for a few years I found there where a lot of limitations, particularly around the dependency injection and event dispatch system, that required a lot of work to keep performant because of the inherited limitations of PHP as well as what I feel were not the best design decisions around this idea, but I’m glad so many others have had great success here
I mean surely that depends on the crowed you hang around with. Majority of people I interact with use PHP primarily. Anecdotal evidence isn't great at identifying trends.
The Laravel framework (https://laravel.com) and its growing ecosystem and welcoming community is a great example of this renaissance.
Is it? Laravel effectively has a single maintainer, as its other contributors seem to have abandoned it[1].

It also seems to have declining interest after peaking in 2017[2].

EDIT: I was looking at the wrong repository, so my comment about Laravel's popularity is wrong.

1. https://github.com/laravel/laravel/graphs/contributors

2. https://trends.google.com/trends/explore?date=today%205-y&ge...

You should probably be looking at the core Laravel framework repository, not the "new project"-boilerplate.

https://github.com/laravel/framework/graphs/contributors

To me it seems like the ecosystem is growing rapidly. There are at least three large conferences each year, a handful of established podcasts and an excellent video tutorials site. There are also a number of paid services like Vapor for running Laravel on Lambda, Forge for easier server management and Laravel Shift for automatic version upgrades.

You're looking at the bootstrap install repo. That's barely changed since 5.0 was released in 2015-ish. The framework repo[1] is still being maintained by many different developers and sees a significant new release every 6 months. Taylor still accounts for a significant amount of contributions, but it is his project afterall. Also worth noting that the framework has pretty much reached maturity at this point and updates are more focused on stability and bug fixes than new features. A lot of the work being done is on the ecosystem being built around Laravel (see "The Laravel Ecosystem" on [2]), with Taylor currently teasing another new piece to the ecosystem to be released with Laravel 8 in a few weeks that apparently involves inertia.js (whose maintainer is a speaker at the Laracon event too, if I remember correctly)

1: https://github.com/laravel/framework/graphs/contributors

2: https://laravel.com/

As an addition to this, it's also worth noting that Laravel has enough development going on to support at least 4 full time employees that I'm aware of, in addition to Ottwell himself working full time on it.
I don't think PHP _needs_ a renascence. It's already a widely used language, so I prefer it to keep growing the good parts and leaving behind the bad old habits.
> PHP is seeing a renascence and renewed interest

I have seen no PHP renaissance anywhere (real life, Hacker News, reddit, or anywhere else), but I also checked TIOBE[1]. PHP's popularity peaked in 2006, when it was 500% as popular as it is now.

1. https://www.tiobe.com/tiobe-index/php/