PHP | Stop the execution of php script | exit() funtion
By using exit() function we can stop the execution of php script.
<?php
$a = 10;
$b = 20;
$c = $a+$b;
exit();
echo $c;
// In the above example execution will stop after addition it will not print variable c.
?>