1--TEST--
2Twig supports binary operations (+, -, *, /, ~, %, and, or)
3--TEMPLATE--
4{{ 1 + 1 }}
5{{ 2 - 1 }}
6{{ 2 * 2 }}
7{{ 2 / 2 }}
8{{ 3 % 2 }}
9{{ 1 and 1 }}
10{{ 1 and 0 }}
11{{ 0 and 1 }}
12{{ 0 and 0 }}
13{{ 1 or 1 }}
14{{ 1 or 0 }}
15{{ 0 or 1 }}
16{{ 0 or 0 }}
17{{ 0 or 1 and 0 }}
18{{ 1 or 0 and 1 }}
19{{ "foo" ~ "bar" }}
20{{ foo ~ "bar" }}
21{{ "foo" ~ bar }}
22{{ foo ~ bar }}
23{{ 20 // 7 }}
24--DATA--
25return ['foo' => 'bar', 'bar' => 'foo']
26--EXPECT--
272
281
294
301
311
321
33
34
35
361
371
381
39
40
411
42foobar
43barbar
44foofoo
45barfoo
462
47