I have just seen this
// Check to see if the request is a HXR call
if (request::is_ajax())
{
// Send the 403 header
header('HTTP/1.1 403 Forbidden');
return;
}
I have not seen a simple return
before, and I have never used it. My only guess is that it simply acts the same as any return 'something'
(halting the function), except doesn't actually return a result.
Furthermore, what would happen in this situation?
function text($var)
{
if ( ! $var) {
return;
}
do_something();
}
$var = text('');
I know it's a bad example (it should probably return false or throw an exception), but would it be an error, or would the $var
simply be null or blank?