1``sort``
2========
3
4The ``sort`` filter sorts an array:
5
6.. code-block:: jinja
7
8    {% for user in users|sort %}
9        ...
10    {% endfor %}
11
12.. note::
13
14    Internally, Twig uses the PHP `asort`_ function to maintain index
15    association. It supports Traversable objects by transforming
16    those to arrays.
17
18.. _`asort`: https://secure.php.net/asort
19