@jimw ugh so much pain with the apple for business story that we usually connect the private apple ids to the work laptops. Its really the only major grip i have with apple (at the moment).
Founder and performance detective at https://tideways.com - hosting the Undercover ElePHPant podcast (https://undercover-elephpant.com). Open-Source contributor to Doctrine and PHP-SRC.
@jimw ugh so much pain with the apple for business story that we usually connect the private apple ids to the work laptops. Its really the only major grip i have with apple (at the moment).
@heiglandreas @sebastian @theseer @Tideways PHP is more often than you'd expect the biggest share of response time, especially for complex template engine based systems (Shopware, Magento) . We should run the numbers on that though, good point :)
To satisfy my own curiosity and that of the community, we have built a benchmark to evaluate: Is PHP 8.4 faster than its predecessors 8.3, 8.2 or even 7.4?
See our results:
My conclusions: 1. we might be close to the end of VM optimizations, 2. potential in improving specific APIs 3. JITs not there yet for the web 4. application code and architecture is the main mover for performance. WDYT?
@ocramius @dantleech @phpbench @markusstaab @Tideways I keep getting back to the idea of a Tideways phpbench extension that wraps runs with the Profiler, but haven't found the time or colleague to pass that on yet ;)
Also at #SCUC, I was made aware of a recent @doctrine DBAL performance improvement in the SQL Parser and I learned how to combine patters and identify them with named argument captures.
Wrote about it here: https://tideways.com/profiler/blog/combining-regular-expressions-with-named-capture-groups-to-improve-performance
@dcoderlt I can't say much about the JIT as I am not using it myself and people that do often report that they see no meaningful perf diff for real world apps, and the occasional weird segfault.
During the talk I added this slide, because if you talk about Opcache performance and not mention JIT, its weird.
Published slides from my talk "Winning at PHP in production in 2025", where I gathered a bunch of basic building blocks and must haves to avoid a hot mess or careless leafing (free) performance gains on the table.
https://speakerdeck.com/beberlei/winning-at-php-in-production-in-2025
This remixes some of the material I recently started gathering for my YouTube videos on PHP performance and also features new content that might soon end up in a video.
@ocramius and no code generation 🤩
@ocramius via friendsofphp/proxy-manager-lts yes, but not ReflectionClass::newlazy* yet.
@ocramius nette/di supports it, found with github code search: https://github.com/nette/di/blob/59cf6994c71ac077bb7848beb80031edf29dfef4/src/DI/Definitions/ServiceDefinition.php#L219
@ocramius Symfony DIC I know, Laminas Serivce Manager uses proxy-manager (so far no ReflectionClass::newLazyGhost?). I don't know of others yet. You have more?
While diving deep into lazy objects in PHP these last weeks to add support for them in @doctrine and thinking about them regularly i came to the conclusion that post PHP 8.4 no dependency injection container or object facade / manager can skip implementing it at largr scale. Its a game changer to avoid esger autoloading classes or constructing object graphs that go unused in the request.
@lsmith thats really sad to hear Lukas! 😢
whoopsie indeed the wrong link. We fixed it in the original post now (edit button for the win).
PHP 8.4 introduces lazy loading via the new “Lazy Objects” RFC, objectively an expert-level feature that takes time to understand.
Read our guide to PHP 8.4 lazy objects RFC based on the Doctrine ORM implementation.
We look at how the upcoming Doctrine ORM 3.4 uses PHP’s new ReflectionClass::newLazyGhost to implement lazy loading entities with minimal setup and without code generation.
@heiglandreas yeah Doctrine ORM is suffering as well, readonly is for the 🗑️
Here is a new video of me with an in-depth-tutorial on how #PHP 8.4s new lazy proxies work with a step-by-step example of how I integrated it into the upcoming #DoctrineORM 3.4.
Continuing my first baby steps with video content 🙈 Both kind and brutal feedback welcome in the comments 🤣
So I've been cooking this WE, and got a basic implementation of associated types for #PHP interfaces done.