CPU Usage
31/40
File I/O
Regular Expressions
•
Avoid Using frequent array accesses, remember, each array access is a hash lookup.
The Wrong Way
<?php
$ar
[
'name'
] =
'Sterling'
;
for (
$i
=
0
;
$i
<
20
; ++
$i
) {
print
$ar
[
'name'
];
}
? >
•
Shorten "required" executions, such as loops.
•
Avoid rebuilding large data structures.
•
Look for alternatives to regular expressions