Twig

灵活、快速、安全的PHP模板引擎。(The flexible, fast, and secure template engine for PHP. )

Github星跟蹤圖

Twig——灵活、快速、安全的PHP模板引擎。Twig是PHP的模板语言,根据新的BSD许可证(代码和文档)发布。Twig使用类似于Django和Jinja模板语言的语法,这启发了Twig运行时环境。

快速: Twig编译模板到纯PHP代码并进行了优化。其开销相比常规PHP代码减少到最低。

安全: Twig有一个沙箱模式,可以评估不可信的模板代码。这允许Twig被用作模板语言的应用程序,用户可以修改模板的设计。

灵活: Twig是由一个灵活的词法分析程序和解析器驱动,这允许开发人员定义自己的自定义标签和过滤器,并创建自己的DSL(domain specific languages,领域特定语言)。”

主要指標

概覽
名稱與所有者twigphp/Twig
主編程語言PHP
編程語言PHP (語言數: 4)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2009-10-07 21:23:38
推送於2025-06-06 06:01:41
最后一次提交
發布數262
最新版本名稱v3.21.1 (發布於 2025-05-03 09:22:00)
第一版名稱v0.9.0 (發布於 2010-01-20 13:38:28)
用户参与
星數8.3k
關注者數212
派生數1.3k
提交數7.2k
已啟用問題?
問題數2157
打開的問題數37
拉請求數1638
打開的拉請求數18
關閉的拉請求數781
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Twig, the flexible, fast, and secure template language for PHP

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

Sponsors

.. raw:: html

<a href="https://blackfire.io/docs/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
    <img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>

More Information

Read the documentation_ for more information.

.. _documentation: https://twig.symfony.com/documentation