Generators, fibers and autoloading

Lazy sequences and the machinery around a class: values sent into a generator, fibers, attributes read through reflection, a closure bound to an object, and composer.json with PSR-4 autoloading.

10.1 Generators advanced send into a generator, read its return, and delegate with yield from Open 10.2 Fibers (PHP 8.1) pause and resume code with Fibers for cooperative multitasking Open 10.3 Attributes via reflection read attributes with reflection and turn them into a small validator Open 10.4 Closure binding capture variables and bind a closure to an object to reach private state Open 10.5 composer.json deep dive every composer.json section, scripts and autoload managed with care Open 10.6 PSR-4 autoloading map namespaces to paths, dump-autoload, classmap and files loading Open

Lessons