Chapter 9. Error Management and Exception Handling

This chapter examines error management and exception handling. Error management qualifies how you configure and manage errors in your PHP environment. Errors can be compile-time or run-time failures. Run-time errors are not run-time exceptions but behave differently, requiring proactive management in your programming code. Prior to PHP 5, run-time errors were often simply suppressed by the error control operator.

Beginning with PHP 5, you manage known run-time errors by both suppressing and rethrowing them as exceptions. Exceptions are also new to PHP 5. Run-time events raise exceptions, which don’t happen during the parsing phase like compile-time errors. Exception handling qualifies how you ...

Get Oracle Database 10g Express Edition PHP Web Programming 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.