note 6761 deleted from strpos by ronabop

From: Date: Fri, 25 Aug 2000 09:16:18 +0000
Subject: note 6761 deleted from strpos by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-3198@lists.php.net to get a copy of this message
strpos *seems* not to work correctly with php4.0. When the needle isn't found, it doesn't return false as it used to do with 3.*. Making an echo of the return value displays nothing. So I tried to change the test to : <PRE> $pos = strpos($haystack, $needle) if ( ($pos == "") || ($pos == false) ) {....} </PRE> but it doesn't work... Is it a bug or have i done an unforgivable mistake? thanks, silvin

« previous php.notes (#3198) next »