Main differences in die() and exit() in PHP

Can someone please explain what are the main differences in die() and exit() in PHP?

Comments

  • MasovskiMasovski Stelle, Niedersachsen, Germany

    There is no difference.

    They're doing the same thing, just under different names. In other words, they're equivalent as said here for exit() and here for die().

  • Actually there is no difference.

    PHP Manual for exit:

    Note: This language construct is equivalent to die().

    PHP Manual for die:

    This language construct is equivalent to exit().

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories