Is there a way to execute a return
statement as a function's caller?
Take:
index.php:
require action.php
action.php:
require check.php
checkAccess() || return;
doSomeSecretStuff();
check.php:
function checkAccess() {
if(loggedIn)
return true;
return false;
}
and I was wondering if there is a way to execute that return
statement forcing action.php to stop from inside checkAccess()
?
kinda like get_function_caller().eval("return");
(super-pseudo code)