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

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: [PHP4BETA] propose for bool -> string conversion:
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-1823@lists.php.net to get a copy of this message
> > Sometimes you don't care if they fail. What exactly are you proposing for > > the strpos() function? > > I didn't propose anything. Now please don't tell me that I should > go away, because I don't have any better proposal. > > What about a new function xxx which behaves as strpos but returns > -1, if it doesn't find the character? -1 is an illegal index, and > -1 != false. That still doesn't really solve that example you gave though. Now if(strpos()) will return true when the character isn't found. That's sort of confusing as well. I really don't know what the right solution is. It is a tricky situation, but I don't agree that the current implementation is just plain wrong. -Rasmus

« previous php.version4 (#1823) next »