die()
and exit()
are precisely identical; they halt the entire PHP program and return to the OS. They're two different names for the same function.
return
, on the other hand, ends a function call and returns to the caller. At the end of a program, return
sets the status value that is returned to the OS; the program is going to exit no matter what.