PHPerror_reporting sets the error report level

Source: Internet
Author: User
In PHP, errors are usually reported. The following describes how to set the error report level for PHPerror_reporting. Set the error log report level.

In PHP, errors are usually reported. The following describes how to set the error report level for PHP error_reporting.

 

 

The error log report Level Settings. in some cases, some errors cannot be displayed due to the error level settings. for this function, you must understand the error log report Level. the following levels are provided:

PHP error_reporting is used to set the error message return level. the level parameter is an integer bitmask. See the following table.

Mask value

1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
0 close error report

E_NOTICE indicates that the file is generally not recorded and used only when the program has an error, for example, an attempt to access a variable that does not exist or call stat () to view a file that does not exist.

E_WARNING is usually displayed, but the program execution will not be interrupted. This is effective for debugging. For example, call ereg () in a problematic general notation ().

E_ERROR is usually displayed and the program execution is interrupted. This mask cannot be used to trace memory configurations or other errors.

E_PARSE parses errors from the syntax.

E_CORE_ERROR is similar to E_ERROR, but does not include errors caused by the PHP core.

E_CORE_WARNING is similar to E_WARNING, but does not include PHP core error warnings.

The above is the detailed usage of PHP error_reporting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.