Differences between die and exit in php what is the difference between die and exit in php?

Source: Internet
Author: User
Tags exit in
What is the difference between die and exit in php? The two seem to both terminate the program execution, and it seems that there is no difference indeed. some people say that they can take a bubble before they die, but they will not. after reading the manual, it seems that exit can also output something.

What is the difference between die and exit in php?

Both of them seem to be terminating program execution, and they seem to be different.

GOOGLE, some people say that one can take a bubble before they die, and the other can't

After reading the manual, it seems that exit can also output something.

Void exit ([string status]);

Note: As this is a language structure rather than a function, exit cannot be called by variable functions.

It's dead, even if it can be handed over to other variables or functions.

There is a description about die.

Die -- Equivalent to exit ()

It seems that there is no difference between die and exit 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.