1.2.1468. error_reporting() With Integers¶
<?php
// This is ready for PHP next version
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING);
// This is not ready for PHP next version
error_reporting(2047);
// -1 and 0 are omitted, as they will be valid even is constants changes.
error_reporting(-1);
error_reporting(0);
?>
See also directive error_reporting and error_reporting.
1.2.1468.1. Suggestions¶
Always use the constant combination when configuring error_reporting or any PHP native function
1.2.1468.2. Specs¶
Short name |
Structures/ErrorReportingWithInteger |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Instant (5 mins) |
Precision |
Very high |
Examples |
|
Available in |