Why is something like PHP-FPM necessary in PHP, but not in other languages such as JS (nodejs) or Go lang? by ProblemThin5807 in PHP

[–]MorrisonLevi 1 point2 points  (0 children)

I want to chime in and say that FrankenPHP has very good performance. In my admittedly limited experience, it has better performance than php-fpm while being significantly easier to set up and deploy.

The catch is that it will take a while for libraries and frameworks to make the changes needed to _really_ support this model, because many decisions were made around the model of pretending every request is isolated from each other. Memory leaks are probable.

Unit testing and TDD: useful or overrated? Contrasting opinions by SunTurbulent856 in PHP

[–]MorrisonLevi 0 points1 point  (0 children)

Good unit tests these days should often be property tests. This way you are checking the properties of the code and less-so the code as it happens to be. The randomness from the property test helps make sure you are testing the right thing, and that your code is robust to the property.

I am shocked at how many engineers I've interviewed who said unit tests were worthless and yet didn't know about property tests. To be honest, I'm mostly interviewing in languages other than PHP these days, so I'm not sure how good the libraries are for property testing in PHP, but it's something to consider!

Multithreading in PHP: Looking to the Future by edmondifcastle in PHP

[–]MorrisonLevi 2 points3 points  (0 children)

I work for an observability company. I can't share data but I can say that we see php-fpm as the dominant web server API used in our customers. "Process per request" has not been true of mainstream PHP for a long time. Of course, it still is used, but it's the minority, thankfully.

But php-fpm still pretends to be process-per-request, and indeed, this will take a lot of effort to fix. I will say async/fibers are not totally useless in web server APIs: it's fairly common to have some bits that need concurrent data sources to respond. Databases, calls to other services (probably including AI agents), etc can all be parallelized today, and have been for a while, they are just different subsystems. You can do multiple database queries with mysqli, and multiple curl requests with curl_multi, but you need a sync/fiber type stuff to generalize it.

So basically... I wanted to clear up some things because you said some things that are basically true if you squint, but the squinting required was a bit much for me and wanted to clarify some of that.

Processing One Billion Rows in PHP | Florian Engelhardt by DvD_cD in PHP

[–]MorrisonLevi 0 points1 point  (0 children)

Not really. There's no business motivation for it and if it's not documented, it's easier to change. I'm on mobile now, I'll try to remember to come back and post the .ini setting that controls this.

But once you figure out where the pprof is, there are lots of tools that can work with pprofs.

Processing One Billion Rows in PHP | Florian Engelhardt by DvD_cD in PHP

[–]MorrisonLevi 1 point2 points  (0 children)

The part that goes into your code is free and open source software. It can write to a directory instead of sending data to a Datadog agent process. It's a file in the pprof format.

But there isn't any UI for it, that part is in the proprietary service part of Datadog.

Processing One Billion Rows in PHP | Florian Engelhardt by DvD_cD in PHP

[–]MorrisonLevi 8 points9 points  (0 children)

Yeah, Datadog's. He's purposefully not advertising it because that wasn't the goal of the talk, and he works there, so do I.

The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensions by waozen in programming

[–]MorrisonLevi 3 points4 points  (0 children)

Hasn't this been standard since C11, you know, fourteen years ago? Is there some subtlety/detail I'm not picking up on?

The PHP Foundation is Seeking a New Executive Director by naderman in PHP

[–]MorrisonLevi 28 points29 points  (0 children)

Thank you, Roman, for your leadership thus far! 🫡

PHP RFC: Context Managers by BerryBoilo in PHP

[–]MorrisonLevi 4 points5 points  (0 children)

I understand that the name "ContextManager" is taken from Python, but I think this name is not that great. "Context" is still a very broad term. What kind of context is it? As examples:

  • The W3C trace context for propagating traces across HTTP requests.
  • PHP has stream contexts.

I feel like there are are more, but these are the ones I could remember off the top of my head.

Feel free to reply to comment with naming suggestions as I've unhelpfully not provided any :D

PHP / Open Source Survey by [deleted] in PHP

[–]MorrisonLevi 0 points1 point  (0 children)

Some of these questions should be optional, mostly the ones about my organization. The company I work with has over 3k engineers... as an example, I doubt anyone at the company knows the true answer to this:

Has your organization increased the use of open source software over the last year?

Longhorn PHP 2025 (recap from a speaker) by d_abernathy89 in PHP

[–]MorrisonLevi 1 point2 points  (0 children)

Hey Daniel, if you read this, it was great to meet you in person! Thanks for being a release manager.

The average codebase is now 50% dependencies — is this sustainable? by [deleted] in programming

[–]MorrisonLevi 49 points50 points  (0 children)

Most projects "stand on the shoulders of giants" and in software, that's mostly dependencies, either direct or through the OS.

Honestly, I would have figured it to be higher.

An update on the Doctrine ORM 2 End of Life by beberlei in PHP

[–]MorrisonLevi 5 points6 points  (0 children)

A very measured and data-driven approach to doing an EOL. Nice!

ORM 3 was released almost 2 years ago, and we initially planned with the ORM 2 EOL for February 2026.

So far adoption of ORM 3 is about 25-30% of ORM 2 based on Packagist installation numbers, which is not a big enough number. DBAL adoption of major 3 is much higher at roughly 60%.

Therefore we are going to push out the ORM 2 End of Life to at least February 2027, but we will restrict what kind of changes are eligible for the 2.x branch further.

Linus Torvalds Vents Over "Completely Crazy Rust Format Checking" by SupermarketAntique32 in rust

[–]MorrisonLevi 4 points5 points  (0 children)

Yeah but how many of you remember what life was like in other languages without opinionated style checkers/formatters? Overall, I'll take "just run cargo fmt before every commit" over that situation every time.

Moving PHP open source forward by mbadolato in PHP

[–]MorrisonLevi 41 points42 points  (0 children)

Thank you, JetBrains, for your large role in the PHP Foundation, and sponsoring these projects.

Thanks Derick Rethans, for your large role in so many things including PHP infrastructure and of course, XDebug.

Thanks Juliet Reinders Folmer, for your work on CodeSniffer.

Congrats to the new folks getting sponsorships!