Hi
Is there any shorter way for a function to return true if parameter = 10 ?
I have tried searching on the internet but I could not find any answers – most probably because I am not aware of the keywords to search for.
What I have done is
function isTen($a) {
if ($a == 10) return true;
return false
}
Is this the shortest code one can get to in PHP ?
If there is somewhere to read up on this.. please let me know. Right now I feel like I’m looking for a needle in a haystack 🙁
BUT! why would you make a function for this, when you could just check it in-line?