
| Current Path : /var/www/html/china-sensors.de/vendor/twig/twig/doc/functions/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/china-sensors.de/vendor/twig/twig/doc/functions/max.rst |
``max``
=======
.. versionadded:: 1.15
The ``max`` function was added in Twig 1.15.
``max`` returns the biggest value of a sequence or a set of values:
.. code-block:: twig
{{ max(1, 3, 2) }}
{{ max([1, 3, 2]) }}
When called with a mapping, max ignores keys and only compares values:
.. code-block:: twig
{{ max({2: "e", 1: "a", 3: "b", 5: "d", 4: "c"}) }}
{# returns "e" #}