DOC ASAREL

Berlin, Germany

https://www.liebdich.com

#SOreadytohelp

Office lieb dich

Find of the day (by an OP):

...and some things I've seen on the web make it seem like my code might work as is.


If you cease to get better, you cease to be good!


CCNA since July 2013.


To keep it socratic:

I know that I know nothing.


Ah, yes, booleans - bit values that are either set (TRUE) or not set (FALSE). Now that we have 64 bit compilers using an int variable for booleans, there is one value which is FALSE (zero) and 2**64-1 values that are TRUE (everything else). It appears there's a lot more truth in this universe, but false can trump anything that's true...

PHP's handling of strings as booleans is almost correct - an empty string is FALSE, and a non-empty string is TRUE - with one exception: A string containing a single zero is considered FALSE. Why? If any non-empty strings are going to be considered FALSE, why only a single zero? Why not "FALSE" (preferably case insensitive), or "0.0" (with how many decimal places), or "NO" (again, case insensitive), or ... ? (Koschara, 2013)

Koschara (2013) 'Booleans', php.net Documentation, June [Blog comment]. Available at http://php.net/manual/en/language.types.boolean.php#112190 (Accessed 13 February 2014).

Top Answers
No answers with score of 5 or more