CHAPTER 5

image

Handling and Logging Exceptions

“The education of a man is never completed until he dies.” —Robert E. Lee (As quoted in Peter’s Quotations: Ideas for Our Time (1977) by Laurence J. Peter, p. 175)

Chapter Objectives/Student Learning Outcomes

After completing this chapter, the student will be able to:

  • Explain the difference between errors and exceptions
  • Create a PHP program that can handle general exceptions
  • Create a PHP program that can create, raise, and handle user exceptions
  • Explain and use a switch and/or embedded if/else statement
  • Create a PHP program that uses the while loop and/or for loop
  • Create a program that reads/updates ...

Get Learn PHP 7: Object-Oriented Modular Programming using HTML5, CSS3, JavaScript, XML, JSON, and MySQL 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.