Bug #15691: Returns from strpos()

From: Date: Sat, 23 Feb 2002 20:12:52 +0000
Subject: Bug #15691: Returns from strpos()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-873@lists.php.net to get a copy of this message
From: mjohnwood@hotmail.com Operating system: Any PHP version: 4.1.1 PHP Bug Type: Feature/Change Request Bug description: Returns from strpos() It would be boundlessly helpful if someone could make strpos(), etc. return a -1 instead of FALSE like C++/Java. Returning a FALSE (something that casts to an integer of 0) doesn't seem to make much sense. Even if it can be worked around with strpos() === FALSE, it would be a lot easier without having to rely upon it. Any reason why it should be using FALSE instead of -1? -- Edit bug report at http://bugs.php.net/?id=15691&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15691&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15691&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15691&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15691&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15691&r=support Expected behavior: http://bugs.php.net/fix.php?id=15691&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15691&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15691&r=submittedtwice

« previous php.bugs (#873) next »