Fabien Potencier b843e780bc minor #4355 Simplify compiled for loop code (ruudk)
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

Simplify compiled `for` loop code

**Do not pass closure as reference**
It's not needed.

**Do not use same var names in loop function**
These variables are passed in when the loop function is invoked when yielding.
Giving them the same internal var names complicates things for no good reason.

Commits
-------

a096c202e3 Do not use same var names in loop function
fcb16a0f86 Do not pass closure as reference
2024-09-26 20:43:38 +02:00

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

Twig is a template language for PHP.

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

Sponsors
--------

.. raw:: html

    <a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
        <img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
    </a>

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

Read the `documentation`_ for more information.

.. _documentation: https://twig.symfony.com/documentation
Languages
PHP 99.9%