You are here

function _coder_performance_print_warning in Coder 5

1 string reference to '_coder_performance_print_warning'
coder_performance_reviews in includes/coder_performance.inc
@file This include file implements coder functionality for Performance

File

includes/coder_performance.inc, line 104
This include file implements coder functionality for Performance

Code

function _coder_performance_print_warning() {
  return array(
    '#warning' => t('<code class="good">echo</code> is faster than <code class="bad">print</code> (if return value from <code class="bad">print</code> is not used)'),
    '#description' => t('Even both of these output mechanism are language constructs, if you benchmark the two you will quickly discover that <code>print()</code> is slower than <code>echo()</code>. The reason for that is quite simple, <code>print</code> function will return a status indicating if it was successful or not, while <code>echo</code> simply prints the text and nothing more. Since in most cases (haven\'t seen one yet) this status is not necessary and is almost never used it is pointless and simply adds unnecessary overhead.'),
  );
}