stristr() overwrites haystack
| From: | Sebastian Bergmann | Date: | Thu, 06 Sep 2001 07:44:23 +0000 |
| Subject: | stristr() overwrites haystack | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-65219@lists.php.net to get a copy of this message | ||
<?php
$string = 'FOOBAR';
echo $string . '<br>';
if (stristr($string, 'hubu')) {
tubu();
}
echo $string;
?>
outputs
FOOBAR
foobar
This can't be the intended behaviour, can it?
--
Sebastian Bergmann Measure Traffic & Usability
http://sebastian-bergmann.de/ http://phpOpenTracker.de/