PHP:Hide Warnings
De WikiMar
<syntaxhighlight lang="php">
// Comment the following while Debugging: $old_reporting_level = error_reporting(); error_reporting(0); // Turn off all error reporting // this avoids displaying warnings if some user variables are not set.
// ...
//Set reporting level to the old level saved previously error_reporting($old_reporting_level);
</syntaxhighlight>