The documentation for "header" says to use "exit" after "header".
Should I use "return" instead of "exit" when header("location: $url") is ran from inside a function? The documentation doesn't relate to such a scenario.
Thanks!
How to stop function code after header("location: $url")
Moderator: General Moderators
Re: How to stop function code after header("location: $url")
Use exit().
A return() called in a function doesn't guarantee that the code execution will stop immediately after the function call.
A return() called in a function doesn't guarantee that the code execution will stop immediately after the function call.
There are 10 types of people in this world, those who understand binary and those who don't