Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About this Book
About the Title
About the Cover Illustration
1. Tools and concepts
Chapter 1. PHP and modern software development
1.1. How PHP can help you
1.1.1. Why PHP is so popular
1.1.2. Overcoming PHP’s limitations
1.2. Languages, principles, and patterns
1.2.1. Agile methodologies: from hacking to happiness
1.2.2. PHP 5 and software trends
1.2.3. The evolving discipline of object-oriented programming
1.2.4. Design patterns
1.2.5. Refactoring
1.2.6. Unit testing and test-driven development
1.3. Summary
Chapter 2. Objects in PHP
2.1. Object fundamentals
2.1.1. Why we’re comparing PHP to Java
2.1.2. Objects and classes
2.1.3. Hello world
2.1.4. Constructors: creating and initializing objects
2.1.5. Inheritance and the extends keyword
2.1.6. Inheriting constructors
2.2. Exception handling
2.2.1. How exceptions work
2.2.2. Exceptions versus return codes—when to use which
2.2.3. Creating your own exception classes
2.2.4. Replacing built-in PHP fatal errors with exceptions
2.2.5. Don’t overdo exceptions
2.3. Object references in PHP 4 and PHP 5
2.3.1. How object references work
2.3.2. The advantages of object references
2.3.3. When references are not so useful
2.4. Intercepting method calls and class instantiation
2.4.1. What is “method overloading”?
2.4.2. Java-style method overloading in PHP
2.4.3. A near aspect-oriented experience: logging method calls
2.4.4. Autoloading classes
2.5. Summary