Question: what is the difference between die() and exit() in php?
Answer: Use die() when there is an error and have to stop the execution. e.g. die( 'Oops! Something went wrong' ); Use exit() when there is not an error and have to stop the execution.