PHP E_WARNING

E_WARNING (2) identifies a runtime warning. Execution normally continues, although a custom error handler can change that behavior. Some diagnostics in these older examples changed in PHP 7 or PHP 8.

A simple example

E_WARNING

  1. Start with An include of a missing practice file
  2. Do this Attempt to include it
  3. Result A warning is reported
With the default handler, include reports the missing file and execution can continue.