找出已安装的 twig 版本

2022-01-22 00:00:00 php twig

有没有办法找出我安装的 Twig 版本?

Is there a way to find out my installed version of Twig?

有点像

<p>The current version is {% twig.version %}</p> 

(虽然我知道这还不算正确).

(although I know that's not even close to being right).

推荐答案

试试看:

<p>The current version is {{ constant('Twig_Environment::VERSION') }}</p> 

相关文章