Home >> PHP >> What are function for controlling script execution in PHP

What are function for controlling script execution in PHP

There are two function for controlling script execution-

1)-exit()-exit() function used to immediatly terminating the script execution.

Example

if($var!=$var1){

     echo "Access denied";

     exit();

}

2)-die()-die() function used to immediatly terminating the script execution.this is alias of exit().

Example

if($var!=$var1){

     echo "Access denied";

     die();

}

Post Your Comment

Next Questions
exit() function
die() function
fun_num_args() function
ereg_replace() function
ereg_ireplace() function
preg_match() function
preg_replace() function
File handling
fopen() function
fclose() function
fread() function
create the file
Check the file is available or not
Destroy the file
Write into the file
Create into folder
Remove a folder
touch() function
file_exits() function
unlink() function
fwrite() function
mkdir() function
rmdir() function
is_dir() function
file_get_contents() function

Copyright ©2022 coderraj.com. All Rights Reserved.