TwigでPHPの===
てきとうにif文書いたら、空でもゼロでも通ってしまった。
{% if value == '0' %}
何も考えずに==を===してみたら、シンタックスエラーになった。
ちゃんと調べた。 https://twig.symfony.com/doc/1.x/tests/sameas.html
This is the equivalent to === in PHP
よさそうですな。
{% if value is same as('0') %}
いい感じに動いてくれた。