Monday, 10 June 2013

What is the use of die function in php?

When error occurs in php script, it displays the error information to user in php.

Sometimes we have to stop the execution of the script, at that time you can use die function.

This function will stop the execution of php script. That means Script statements followed by die() will not execute.

die("Error occured .....stopping script");

Thus the use of die function is to suspend the execution of the script in php....

No comments:

Post a Comment