PHP 4.0 Bug #5745: strpos returns false if match on first character

From: Date: Sun, 23 Jul 2000 10:18:04 +0000
Subject: PHP 4.0 Bug #5745: strpos returns false if match on first character
Groups: php.dev 
Request: Send a blank email to php-dev+get-25553@lists.php.net to get a copy of this message
From: steve@srtware.com Operating system: Windows 98 SE PHP version: 4.0.1pl2 PHP Bug Type: Misbehaving function Bug description: strpos returns false if match on first character if (strpos('abcde', 'abc')) { (...) will evaluate as false since the value returned is zero. The documentation says it will return false if the string is not found.

« previous php.dev (#25553) next »