Fabien Potencier 92ebfcb1cc minor #2618 Optimized compilation for arrays when using a['b'] notation (fabpot)
This PR was squashed before being merged into the 2.x branch (closes #2618).

Discussion
----------

Optimized compilation for arrays when using a['b'] notation

Under certain conditions, and thanks to the `??` operator, it's possible to optimize array calls (and avoid the call to `twig_get_attribute()`).

On my local machine, code is almost twice as fast, which is nice if you are using a lot of `a["b"]` calls of nested ones.

refs #2547

Commits
-------

6f7ea45c optimized nested array calls
f3b8f4a8 added some tests
d501e0e5 optimized compilation for arrays when using a['b'] notation under certain conditions
2018-01-30 14:51:06 +01:00
2018-01-07 18:54:41 +01:00
2018-01-30 14:13:54 +01:00
2017-08-19 19:42:41 +02:00
2017-06-12 09:59:07 -07:00
2017-11-07 22:28:59 +01:00
2017-11-12 10:48:08 -08:00
2017-08-16 08:18:33 +02:00
2018-01-07 18:54:25 +01:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: http://twig.sensiolabs.org/documentation
Languages
PHP 99.9%