Prev | Current Page 279 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

However, as applications continue to grow increasingly
complex and unwieldy, the importance of incorporating proper error-handling
strategies into your daily development routine cannot be overstated. Therefore, you
should invest some time becoming familiar with the many features PHP has to offer
in this regard.
Configuration Directives
Numerous configuration directives determine PHP??™s error-reporting behavior. Many of
these directives are introduced in this section.
Setting the Desired Error Sensitivity Level
The error_reporting directive determines the reporting sensitivity level. Fourteen
separate levels are available, and any combination of these levels is valid. See Table 8-1
for a complete list of these levels. Note that each level is inclusive of all levels residing
below it. For example, the E_ALL level reports any messages resulting from the 13
other levels residing below it in the table.
Table 8-1. PHP??™s Error-Reporting Levels
Error Level Description
E_ALL All errors and warnings
E_COMPILE_ERROR Fatal compile-time errors
E_COMPILE_WARNING Compile-time warnings
E_CORE_ERROR Fatal errors that occur during PHP??™s initial start
E_CORE_WARNING Warnings that occur during PHP??™s initial start
E_ERROR Fatal run-time errors
E_NOTICE Run-time notices
E_PARSE Compile-time parse errors
E_RECOVERABLE_ERROR Near-fatal errors (introduced in PHP 5.2)
E_STRICT PHP version portability suggestions (introduced in PHP
5.


Pages:
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291