Twig

The flexible, fast, and secure
template engine for PHP

a Symfony Product
Docs Tests same as
You are reading the documentation for Twig 3.x. Switch to the documentation for Twig 1.x, 2.x.

Questions & Feedback

License

Twig documentation is licensed under the new BSD license.

same as

same as checks if a variable is the same as another variable. This is equivalent to === in PHP:

1
2
3
{% if user.name is same as(false) %}
    the user attribute is the 'false' PHP value
{% endif %}