difference between "split" exit () and die

Source: Internet
Author: User
Tags exit in
The difference between "split" exit () and die
1. What is the essential difference between exit () and die?
2. What do you often use when you are debugging in your usual code or project?
3, with exit () or die is for convenience or other reasons?

Guys, tell me!

By the way, scattered points!

Share to: more


------Solution--------------------
The manual is very clear.

Die― equivalent to exit ()

------Solution--------------------
There's no difference between interruptions, by the way.
------Solution--------------------
The die () function outputs a message and exits the current script.
The function is an alias for the exit () function.


Why this meaningless thing is tangled
------Solution--------------------
With exit (), die () look at the Ugly ~ ~
Knot stickers to the bar ~ ~

------Solution--------------------
The general use of exit (), die occasionally used, the real difference has not been delved into.
------Solution--------------------
The die () function outputs a message and exits the current script.
The function is an alias for the exit () function.
If the status is a string, the function outputs the string before exiting.
If the status is an integer, this value is used as the exit state. The value of the exit status is between 0 and 254. Exit status 255 is reserved by PHP and will not be used. Status 0 is used to successfully terminate the program.
If PHP has a version number greater than or equal to 4.2.0, the parameter will not be output if the status is an integer.


------Solution--------------------
* and the difference between the hen ...
------Solution--------------------
Citation:
* and the difference between the hen
...
haha * and miss the Difference
------Solution--------------------
Knot it, I'm here to pick up the points. In fact, I do not know, novice passing.
------Solution--------------------
Exit and die are the same.
Exit is from the C word, die is PHP special

PHP recommends that you use die, but the compilers of the PHP manual have reversed them.
Turning exit into a synonym for die is a synonym for exit.
The primary and secondary is reversed, making the person feel the Die dispensable appearance
actually otherwise
Many of the PHP industry is the ASP to switch over, exit in the VBS is to jump out of the loop instructions, rather than terminate the program
The continuation of the exit is not conducive to this group of people's approval of PHP
------Solution--------------------
Upstairs is the solution Oh ~~~~~~~~~
------Solution--------------------
Come on, pick up a point.
------Solution--------------------
Xu Moderator Mighty!
------Solution--------------------
One more use of exit habits
------Solution--------------------
Pick up and check out
------Solution--------------------
Alias, no difference
------Solution--------------------
I'm more of a die.
  • Related Article

    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.