mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
optimized for loops with count() function calls
This commit is contained in:
@@ -400,7 +400,7 @@ href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">bob&a
|
||||
<para>
|
||||
Smarty's homepage is located at http://www.phpinsider.com/php/code/Smarty/.
|
||||
You can join the mailing list by sending an e-mail to
|
||||
subscribe-smarty@lists.ispi.net. An archive of the mailing list can be
|
||||
smarty-general-subscribe@lists.php.net. An archive of the mailing list can be
|
||||
viewed at http://marc.theaimsgroup.com/?l=smarty&r=1&w=2
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
@@ -3737,6 +3737,16 @@ OUTPUT:
|
||||
math function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
math is an expensive function in performance due to its use of
|
||||
the php eval() function. Doing the math in PHP is much more
|
||||
efficient, so whenever possible do the math calculations in PHP
|
||||
and assign the results to the template. Definately avoid
|
||||
repetitive math function calls, like within section loops.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>math</title>
|
||||
<programlisting>
|
||||
|
||||
Reference in New Issue
Block a user