Bug #2563 Updated: strpos returns the same result for "not found" and "found at 1st character"

From: Date: Sun, 31 Oct 1999 15:34:37 +0000
Subject: Bug #2563 Updated: strpos returns the same result for "not found" and "found at 1st character"
Groups: php.dev 
Request: Send a blank email to php-dev+get-12042@lists.php.net to get a copy of this message
ID: 2563 Updated by: rasmus Reported By: sascha.mantscheff@t-online.de Status: Closed Bug Type: Misbehaving function Assigned To: Comments: It's not ideal, but strpos() returns 0 when the char is found in the first position and an empty string when it isn't found at all. strlen(strpos()) would give you a proper true/false, for example. Full Bug description available at: http://bugs.php.net/?id=2563

« previous php.dev (#12042) next »