Back to Browse

Lazy Objects for Dependency Injection in PHP (Deep Dive)

444 views
Jun 12, 2025
24:00

Subscribe to my newsletter for PHP performance content: https://tideways.com/newsletter?utm_source=yt&utm_campaign=yt-lazyobjects-dic Try our PHP Profiler: https://tideways.com/profiler/features?utm_source=yt&utm_campaign=yt-lazyobjects-dic The new Lazy Object RFC in PHP 8.4 will have a big effect on Dependency Injection in PHP and in this video I will explain how based on a simple container example and the Symfony DIC. Along the way I talk about: - https://wiki.php.net/rfc/lazy-objects - https://mwop.net/blog/245-Autoloading-Benchmarks.html - https://github.com/symfony/symfony/pull/59913 00:00 Introduction 01:13 Lazy Services in Dependency Injection 03:51 Lazy Objects PHP RFC Review 06:04 Simple Lazy Container Example 16:48 Symfony with Lazy Objects 23:05 Ending

Download

1 formats

Video Formats

360pmp443.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Lazy Objects for Dependency Injection in PHP (Deep Dive) | NatokHD