Two lines of a class, and half of my docblocks can be deleted:

class Money
{
    private int $amount;
    private string $currency;
}

PHP 7.4 came out yesterday, and this is the part I start using on Monday. Those docblocks existed only to say @var int. Now the language says it, and unlike the docblock, it checks. Assign a string, get a TypeError at the assignment, not a strange bug three layers later.

There is one new state to learn. A typed property without a default is uninitialized, and reading it before the first write throws. This is the feature. “Object exists but is not filled yet” finally fails loudly instead of pretending to be null.

Preloading is the other thing in 7.4, and here I want to cool the excitement. The idea is good: opcache.preload points to a script that loads your classes once at FPM start, and they sit in memory permanently, linked and ready, shared by all workers. No stat calls, no autoloader work on the hot path.

But look at your baseline first. On a normal 7.3 setup with opcache warm and composer dump-autoload -O, the autoloader is a small slice of the request. Preloading shaves a few percent for a real operational price. The preload script is code you now maintain. A fatal error in it means FPM does not start at all. And preloaded files ignore your deploy until FPM restarts. That last one is sneaky. Deploy scripts that reload FPM keep working. Deploys that relied on opcache timestamp checks serve old classes, and you spend an evening learning why.

Optimization without a baseline is decoration.

So the plan: typed properties now, everywhere new code is written. Preloading after I profile a real application under real traffic and see the autoloader actually cost something. I have not profiled it yet. The config line stays commented out.