Dev Tools · 1h ago
PHP DTO hydration hits 4.5M ops/s with compiled closures
Simple Data Objects compiles specialized closures per PHP data class, eliminating reflection and dispatch overhead. The package generates inline array reads and persists code in opcache, achieving 4.5 million hydrations per second. PHP 8.4 lazy ghosts further defer hydration until first property access.
Meridian48 take
Impressive numbers, but the real test is whether the compile-once approach holds up in complex, real-world PHP applications with dynamic schemas.
Read the full reporting
Compiling PHP DTOs: from reflection to 4.5M hydrations per second →
DEV Community
phpdto-hydration