Expanded definition of empty

This commit is contained in:
Nathan Perry
2016-09-21 15:12:56 -04:00
committed by Fabien Potencier
parent f2a9ef3579
commit 9c6b8cb3e4
+4 -1
View File
@@ -1,7 +1,7 @@
``empty``
=========
``empty`` checks if a variable is empty:
``empty`` checks if a variable is an empty string, an empty array, an empty hash, exactly ``false``, exactly ``null``:
.. code-block:: jinja
@@ -9,3 +9,6 @@
{% if foo is empty %}
...
{% endif %}
.. _Countable: http://php.net/manual/en/class.countable.php
.. _count: http://php.net/manual/en/function.count.php