note 4643 modified in stristr by ronabop

From: Date: Sun, 05 Nov 2000 04:38:17 +0000
Subject: note 4643 modified in stristr by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-7394@lists.php.net to get a copy of this message
Be careful in code near a stristr call. It seems that php tries to reuse variables where possible so that in a code snippit like: $temp = $variable; $output = stristr ($something, $variable); The variable $temp is converted to lowercase as well as $variable. (Just two pointers to the same location I guess). A workaround is to make the assignment line: $temp = $variable.""; or even shorten the code to: $output = stristr($something, $variable.""); http://www.php.net/manual/function.stristr.php

« previous php.notes (#7394) next »