In this second part of a two part series, you'll learn how to
use debuggers and optimize performance. It is excerpted from
chapter 12 of the book Zend PHP Certification, written by George
Schlossnagle et al (Sams; ISBN: 0672327090). If you're coming
from a Java background, you might be used to writing a large
infrastructure of classes that rely on each other to perform a
particular task. Don't try this with PHP! PHP's OOP features
work best when your framework is small and efficient. Creating
objects in PHP is a rather slow process, and, as such, it should
be used conscientiously. Sometimes, it's just not possible to
optimize your code beyond a certain point. It might be that your
queries are too complicated or that you depend on a slow
external resource, such as a web service, over which you have no
control. In these cases, you might want to think about using a
caching solution that "saves" the output of an operation and
then allows you to access it without performing that operation
again. There are several