Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>Replace every string concatenation with the "." operator with an array push, for example array [ ] = "foo" and then return a string concatenation implode ( array );</li> <li><p>Use ob_start(); to cache the output:</p> <p>ob_start(); echo $a,$b,$c; $str = ob_get_contents(); ob_end_clean(); </p></li> <li><p>You can optimize if to switch and change the order to your expected result. For example if result a is more likely then result b the condition to catch result a should be the first condition.</p></li> <li>Put a primary key and secondary key on your table(s). </li> </ol> <p>1.1) Don't use a glue and don't add the construction of the array to the time. Here is a benchmark for <a href="http://www.sitecrafting.com/blog/php-string-concat-vs-array" rel="nofollow noreferrer">http://www.sitecrafting.com/blog/php-string-concat-vs-array</a> 1.2) <a href="http://dan.doezema.com/2011/07/php-output-profiling-echo-vs-concat" rel="nofollow noreferrer">http://dan.doezema.com/2011/07/php-output-profiling-echo-vs-concat</a> ( although echo is fastest concat is slower then array and also he uses a glue! 1.3) <a href="https://stackoverflow.com/questions">https://stackoverflow.com/questions</a> 1.4) <a href="http://www.sitepoint.com/high-performance-string-concatenation-in-php/" rel="nofollow noreferrer">http://www.sitepoint.com/high-performance-string-concatenation-in-php/</a></p> <pre><code> Here are my results (30000 strings, time in milliseconds) (Script is taken from 1.4): standard: 0.02418089 implode w/ glue: 0.00435901 implode w/o glue: 0.02205801 foreach: 0.02081609 </code></pre> <p>Conclusion: use implode with glue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload