Highly experimental work-in-progress.
This extension can be used to rewrite parts of PHPStan into native PHP extension using the Zephir language.
Check out Zephir's Installation Guide guide, especially the Zephir Parser extension installation so that your developer environment can compile code written in .zep files.
cd turbo-ext
vendor/bin/zephir generate && vendor/bin/zephir compileOnce you have compiled the extension, you should have this file: turbo-ext/ext/modules/phpstanturbo.so.
Put the absolute path to it to your php.ini like this:
extension=/home/john/dev/phpstan-src/turbo-ext/ext/modules/phpstanturbo.so
Once the extension is loaded, PHPStan will use the extension automatically thanks to the PHPStan\Turbo\TurboExtensionEnabler class.