RE: [PHP] binary zero evaluates as true!?

2006-06-09 Thread Ford, Mike
On 09 June 2006 04:11, D. Dante Lorenso wrote: Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0

[PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Seriously guys... am I completely missing something important here? An empty array evaluates as false. The null character evaluates as false. The STRING 0 even evaluates as false yet a binary zero does not? Even better yet bindec() doesn't appear to be binary safe so it will work for a

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
Jon wrote: Seriously guys... am I completely missing something important here? An empty array evaluates as false. The null character evaluates as false. The STRING 0 even evaluates as false yet a binary zero does not? Even better yet bindec() doesn't appear to be binary safe so it will

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Are you sure you are evaluating your binary '' properly as you claim? Send a sample code alrightey then. the binary data itself is actually stored in a mysql table. (mysql 5.1.9) the relevant part is the following column: ++- | Field | Type

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread D. Dante Lorenso
Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0 (zero) * the float 0.0 (zero) * the empty string, and the