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

后端 未结 7 1943
醉梦人生
醉梦人生 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.

提交回复
热议问题