S!ayer on Nostr: TIL that PHP is pretty flexible with type casting and will automatically treat ...
TIL that PHP is pretty flexible with type casting and will automatically treat numbers as booleans when needed.
i.e. if you had an int variable tokens, you could also then check if(tokens) and if the return value was not 0, it would be true and you could use it as a boolean check.
I usually code in #C so this is interesting to me.
i.e. if you had an int variable tokens, you could also then check if(tokens) and if the return value was not 0, it would be true and you could use it as a boolean check.
I usually code in #C so this is interesting to me.