--TEST--
"filter" tag applies the filter on "if" tags
--DEPRECATION--
The "filter" tag in "index.twig" at line 2 is deprecated since Twig 2.9, use the "apply" tag instead.
--TEMPLATE--
{% filter upper %}
{% if items %}
{{ items|join(', ') }}
{% endif %}

{% if items.3 is defined %}
FOO
{% else %}
{{ items.1 }}
{% endif %}

{% if items.3 is defined %}
FOO
{% elseif items.1 %}
{{ items.0 }}
{% endif %}

{% endfilter %}
--DATA--
return ['items' => ['a', 'b']]
--EXPECT--
A, B

B

A
