Php error handling in basic php tutorials

Source: Internet
Author: User
Tags php programming language
Php error handling in basic php tutorials
This section describes how to handle PHP errors. in any programming language, it is very important to capture and process errors. we recommend that you master these errors.

Here, we will use two examples to show you how to handle php errors. Example 1,

     

Example 2,

     150) {// echo "too old"; // call the trigger and specify the error level. here, you need to view the help document trigger_error ("This is a bad problem", E_USER_ERROR ); // exit () ;}?>

Thanks for your attention to the php getting started tutorial. this series of basic php tutorials will help new php beginners to quickly master the php programming language. The programmer's home will continue to provide php tutorials for you and wish you a better learning experience!

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.