1 Questions about fatal error

Source: Internet
Author: User
A little doubt about fatal error
This post was last edited by xiaozhents126 on 2014-08-28 22:02:35

function dothing () {
$JB->she ();
}

Dothing ();
echo 321;

As on the code, if run, take for granted will burst fatal error She this method on a non-object. I can't get a 321 behind.
Now we don't know if dothing is wrong. Dothing is a black box for us. Run out of dothing (); and Echo 321.

The question I have is, is there a more straightforward notation for 321 in addition to the following notation?

Set_error_handler (' error ');
function dothing () {
$JB->she ();
}


Dothing ();

Function error ($e) {
echo 321;
Exit ();
}
?>
------Solution--------------------
Yes, if an exception can be resolved with a try catch.
However, fatal error terminates the program, and the try catch does not apply.

  • 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.