1
Well, I couldn’t find a more specific title for my question, my doubt is simple. I won’t decorate much. Come on.
Which of these two are correct:
Without return false
;
public static function select($query, $array)
{
if (!is_array($array))
{
die('Database select: Parameter two is not an array');
}
}
With return false
;
public static function select($query, $array)
{
if (!is_array($array))
{
die('Database select: Parameter two is not an array');
return false;
}
}
I would like explanations if anything is incorrect, in my view the second option is unnecessary because the die
already makes the application stop isn’t it? or with the return false
it’s safer for her not to continue?
Opa liked the reply, I can not give +1 on account of my rep but thanks man
– user120469
@Banks imagines, what matters is that I was able to help him :)
– Guilherme Nascimento