exit, exit(), exit(0), die(), die(0) - How to exit script

后端 未结 7 1910
醉梦人生
醉梦人生 2020-12-24 00:10

I believe that all of these (and even die() or die(0)) are identical. If they are not identical, which is preferred for exiting a script successfu

相关标签:
7条回答
  • 2020-12-24 00:51

    die(); is just a synonym for exit(); and is functionally identical.

    The standard way is to use exit code zero to signify success, and anything else to denote an error condition.

    0 讨论(0)
提交回复
热议问题