#15339·phpstan

turbo: inline property fetches to local variabes

Author: staabmCreated Sep 30, 2026Updated Sep 30, 2026
Labelsperformance

Feature request

we want to investigate whether it makes a measurable difference if we inline property-fetches and use local variables instead. https://github.com/nikic/PHP-Parser/pull/1171 shows this can have a marginal impact, but it might make a bigger impact for phpstan as a whole, if implemented in phpstan-turbo.

it might be doable in a similar way how getter-inlining works atm

as a first iteration we could do so for readonly properties

Did PHPStan help you today? Did it make you happy in any way?

No response