Fabien Potencier dfc9edce33 merged branch catchamonkey/compiler_outdent (PR #747)
Commits
-------

459a076 The Compiler outdent method will now only reduce the indentation if it's OK  to do so, It moves and modifies the check up above the indentation modification.

Discussion
----------

Compiler outdent step validation moved up and modified

The Compiler outdent method will now only reduce the indentation if it's OK
to do so, It moves and modifies the check up above the indentation modification.
It's a small improvement but saves a wasted decrement of a variable, when you know an exception will be thrown immediately following it.

---------------------------------------------------------------------------

by nikic at 2012-06-07T23:18:00Z

Compared to throwing an exception decrementing a variable has practically no cost ;)

PS: Not saying that the change is bad or something like that, only saying that performance is the wrong reason to do it :)

---------------------------------------------------------------------------

by catchamonkey at 2012-06-07T23:20:23Z

Yeah, there is no performance gain, but the code only executes that which is necessary.
It's like there being no point preparing a response before you know if you are going to send it. (slightly OTT example, but you get what I mean) :)
2012-06-08 16:53:09 +02:00
2012-05-30 08:18:29 +02:00
2012-04-23 23:30:30 +02:00
2012-05-30 08:18:29 +02:00
2012-04-23 23:34:16 +02:00

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

Build Status

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.

Languages
PHP 99.9%