Error level in PHP

Source: Internet
Author: User

In the course of PHP programming, you will encounter more or less error reminders, it is these error hints, guide us to write cleaner code, today first write our main list of error types, first dig pits, write about PHP errors and anomalies related knowledge, slowly pits.

  • Deprecated lowest level error, program continues execution

  • Notice notification level errors such as using undeclared variables directly, the program continues execution

  • Warning Warning Level error, may not get the desired result

  • Fatal error fatal level error fatal level errors, program does not execute down

  • Parse error syntax parsing errors, highest level errors, and even other error messages are not rendered

  • E_user_ related error user settings related errors

  

How do I set the error level?

error_reporting ( -1) shows all errors,error_reporting (0) masks all errors. Ini_set (' error_reporting ', 0) also masks all errors. You can set error_reporting in the php.ini file to cause the script to display or not display some errors.

Example: error_reporting (e_all&~e_notice) does not display notification level errors. "~" means no.

Error level in PHP

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.