This is not very important, but I was just interested to know the difference.
echo isA("A"); //outputs 1 echo isA("B"); //outputs nothing. why doesn't it output 0?
Can anyone shed some light on this question? This seems to me a double standard when you look at it from the point of view that the βtrueβ outputs are like β1β but βfalseβ do not output β0β.
Again, it doesnβt matter, but I think this approach should be like this for PHP. Knowing this can provide a deeper understanding of this beautiful language.
The true value will appear as visible 1, but the false value will not. So tell me what is the advantage of this method?
exemplary function mentioned above;
function isA($input){ if ( $input == "A" ): return true; else: return false; endif; }
source share