PHP 4.0 Bug #8607 Updated: function strpos() can't return -1 while can't find target (string)

From: Date: Tue, 09 Jan 2001 10:37:53 +0000
Subject: PHP 4.0 Bug #8607 Updated: function strpos() can't return -1 while can't find target (string)
Groups: php.dev 
Request: Send a blank email to php-dev+get-43537@lists.php.net to get a copy of this message
ID: 8607 Updated by: rasmus Reported By: znsoft@sy163.net Old-Status: Open Status: Closed Bug Type: Unknown/Other Function Assigned To: Comments: This report makes very little sense, but I think you are asking for strpos() to return -1 instead of false on a non-match condition. That isn't going to happen. To be consistent it has to return false on a failure. Use the === operator with the strpos() function to accurately distinguish between a 0 and a false. Previous Comments: --------------------------------------------------------------------------- [2001-01-09 00:15:41] znsoft@sy163.net --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8607

« previous php.dev (#43537) next »