Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 357 Bytes

object.md

File metadata and controls

12 lines (8 loc) · 357 Bytes

object

object is a Twig test to test a value for being an object (like is_object in PHP).

It uses the mentioned PHP functions / comparisons internally, so you have the same behavior as in PHP.

{% if somevar is object %} {# no equivalent in Twig %} #}
{% endif %}

Source: Squirrelphp