mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-09 17:06:30 +00:00
ca4d96b7b7eb9e3bc7551a8686ee7a2311df5481
This PR was squashed before being merged into the 1.x branch (closes #3237).
Discussion
----------
Replace strtolower() with strtr() when dealing with method names
This is to improve consistency with the implementation of case-insensitivity for method names etc. in the Zend Engine: In fact, the ZE does not apply the internal `strtolower` implementation, but just maps ASCII `A-Z` to `a-z`.
This was done in https://github.com/php/php-src/commit/582514d4c7b216dbdc7a8429962cf3e5776206f0 to fix issues like https://bugs.php.net/bug.php?id=18556.
Additionally, `strtok` might give a tiny (measurable?) performance gain over `strtolower`, plus it is not locale-dependant.
Commits
-------
30feddef Replace strtolower() with strtr() when dealing with method names
…
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.
Sponsors
--------
.. raw:: html
<a href="https://blackfire.io/docs/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
Description
Languages
PHP
99.9%