0

我一直在寻找、阅读、狩猎和拉扯我的头发。这是唯一提及phpVersionhttps ://phpstan.org/config-reference#phpversion

If you want to analyse a codebase as if it was written for a different PHP version than you’re currently running, change the phpVersion parameter:

parameters:
    phpVersion: 70400 # PHP 7.4

什么……?“70400”?为什么会出现这种奇怪的格式?这是否意味着 PHP 8.1 应该写为“80100”?这真的让我很困惑。我以前从未见过这种格式,也没有用一个词提到它。

另外,我必须将其放入 .neon 配置中吗?我不能在命令行上指定它?这确实使事情变得不必要地复杂化了。

4

1 回答 1

1

PHP_VERSION_ID它与常量使用的格式相同。

于 2021-12-05T16:27:05.527 回答