PHP 8.5 lets you place static closures and first-class callables in constant expressions, so attributes and default arguments can finally carry real logic.
PHP 8.5 adds array_first() and array_last() to read the ends of an array without touching the internal pointer. Here is how they work and why they matter.