Main differences in die() and exit() in PHP - Programmers Heaven

Howdy, Stranger!

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

Categories

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

Jeson84Jeson84 USAPosts: 90Member

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

Tagged:

Comments

  • MasovskiMasovski Stelle, Niedersachsen, GermanyPosts: 2Member

    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().

  • DavidMDavidM USAPosts: 342Member

    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.