© Steve Prettyman 2020
S. PrettymanLearn PHP 8https://doi.org/10.1007/978-1-4842-6240-5_6

6. Handling and Logging Exceptions

Steve Prettyman1 
(1)
Key West, FL, USA
 

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 the for loop

  • Create a program that reads/updates ...

Get Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.