ADVANCED PHP DEBUGGER
Profile
Ex: substr slower than strncmp
foreach ($_SERVER as $k => $v)
  if (substr($k, 0, 5) == “HTTP_”)
     $str .= “$k: $v\n”;
versus:
  if (strncmp($k, “HTTP_”, 5) == 0)
Tip: write for functionality first
Don’t optimize unless 2x improvement
Use APD (“gprof for PHP”)