Exercises

  1. Take a look at your own projects. Can you find anything that would benefit from an object-oriented approach? Is there any functionality that you could extract and develop as a reusable class?

  2. We covered the database abstraction (DBA) layer functions in Hour 12, “Working with the DBA Functions.” Write a class for reading and writing with DBA functions. What exceptions might you need to throw?

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.