note 105218 deleted from function.strpos by danbrown

From: Date: Wed, 03 Aug 2011 13:13:51 +0000
Subject: note 105218 deleted from function.strpos by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182159@lists.php.net to get a copy of this message
Note Submitter: mind ---- To support at tothepointsolution dot com. Did you even test your own example? The result, at least on my computer is int(9) int(0) int(1) which is absolutely correct, considering the fact, that arrays in php are zero based. Are you sure your second example returns boolean FALSE instead of integer zero? Check it with <?php if (strpos('-1','-')===FALSE) { echo 'Something is terribly wrong'; } elseif (strpos('-1', '-')===0) { echo 'OK'; } ?>

« previous php.notes (#182159) next »