Re: [PHP4BETA] propose for bool -> string conversion:

From: Date: Fri, 02 Jul 1999 13:34:07 +0000
Subject: Re: [PHP4BETA] propose for bool -> string conversion:
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-1805@lists.php.net to get a copy of this message
On Fri, Jul 02, 1999 at 09:25:38AM -0400, Rasmus Lerdorf wrote: > > So they're buggy functions. 0 is just as much as false as "" or > > "0" are. > > Whether that is true or not is not really the point. They are out there > and people are using them. And since our strings are indexed starting > from 0, a function that returns the string index of a character at the > first position in a string would logically return 0. strpos has never worked in the case of the needle at the first (index 0) position. You also cannot use strstr everywhere - if the needle is at the end of the haystack, it returns an empty string which happens to be equal to false. I vote for maximum compatibility. -- Regards, Sascha Schumann Consultant

« previous php.version4 (#1805) next »