mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
added a precedence example (refs #1057)
This commit is contained in:
+11
-1
@@ -558,7 +558,17 @@ even if you're not working with PHP you should feel comfortable with it.
|
||||
operators listed first: ``b-and``, ``b-xor``, ``b-or``, ``or``, ``and``,
|
||||
``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, ``..``, ``+``,
|
||||
``-``, ``~``, ``*``, ``/``, ``//``, ``%``, ``is``, ``**``, ``|``, ``[]``,
|
||||
and ``.``.
|
||||
and ``.``:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
{% set greeting = 'Hello' %}
|
||||
{% set name = 'Fabien' %}
|
||||
|
||||
{{ greeting ~ name|lower }} {# Hello fabien #}
|
||||
|
||||
{# use parenthesis to change precedence #}
|
||||
{{ (greeting ~ name)|lower }} {# hello fabien #}
|
||||
|
||||
Literals
|
||||
~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user