What's in This Book

This book is divided into 10 chapters and 3 appendixes. The material in the first half of this book covers vital components of everyday web programming: object-oriented programming, MySQL, SQLite, and XML. It's hard to use PHP 5 without them. Specifically:

  • Chapter 1, Introductionexplains the background of PHP 5 and its new extensions.

  • Chapter 2, Object-Oriented Programming, covers object-oriented programming under PHP 5.

  • Chapter 3, MySQL, examines MySQLi, a new MySQL database extension. It also details SQL features of MySQL 4.0 and 4.1.

  • Chapter 4, SQLite, talks about SQLite, an embedded database library.

  • Chapter 5, XML, teaches everything XML: DOM, XSLT, SimpleXML, SAX, and XPath.

The second half of the book discusses more specialized PHP 5 features. Iterators, exceptions, streams, SOAP, and other extensions are all extremely useful for solving specific tasks. The more you program in PHP 5, the more you'll find yourself integrating these features into your code.

  • Chapter 6, Iterators and SPL, shows how iterators and SPL let you loop through directories, database queries, and XML documents.

  • Chapter 7, Error Handling and Debugging, helps you handle errors with exception handling.

  • Chapter 8, Streams, Wrappers, and Filters, introduces streams, wrappers, and filters.

  • Chapter 9, Other Extensions, discusses the SOAP and Tidy extensions and the Reflection classes.

  • Chapter 10, PHP 5 in Action, puts the whole book together with a sample PHP 5 application.

The three appendixes complement the rest of the book:

  • Appendix A, Introduction to XML, provides an introduction to XML and Namespaces.

  • Appendix B, Additional New Features and Minor Changes, documents the changes in PHP 5 not covered elsewhere in the book.

  • Appendix C, Installing PHP 5 Alongside PHP 4, details how to integrate PHP 5 into your existing web server and PHP 4 setup.