- Avoid Using frequent array accesses, remember, each array access is a hash lookup.
<?php
$ar = array();
$ar['name'] = 'Optimization';
for ($i = 0; $i < count($entries); $i++) {
print $ar['name'];
}
?>
- Shorten "required" executions, such as loops.
- Avoid rebuilding large data structures.
- Look for alternatives to regular expressions