Twig: null-coalescing operator (??)

{{ foo ?? 'no' }}

returns the value of foo if it is defined and not null, 'no' otherwise


https://twig.symfony.com/doc/3.x/templates.html#other-operators
This site uses cookies.