ID:               44427
 Updated by:       [EMAIL PROTECTED]
-Summary:          stripos strpos don't do false on needle not found
 Reported By:      garichner at i2pmail dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         Strings related
 Operating System: S.u.S.E. 10.3
 PHP Version:      5.2.5
 New Comment:

Please provide a short but _complete_ reproducing script. (one that
starts with <?php, ends with ?> and can be simply copy'n'pasted to run.


Previous Comments:
------------------------------------------------------------------------

[2008-03-13 10:31:19] garichner at i2pmail dot org

Description:
------------
stripos strpos don't do false on needle not found

foreach ($buffer_Infile1 as $VAL1) {
                foreach ($VAL1 as $VAL2){
                    $VAL2=trim($VAL2);
                    $POSP=stripos($VAL1[0],".");
                    echo $VAL2." ".$POSP."\n";
                }
does this

s.schaefer 1
sschaefer 1

but should to this

s.schaefer 1
sschaefer 0


Reproduce code:
---------------
foreach ($buffer_Infile1 as $VAL1) {
                foreach ($VAL1 as $VAL2){
                    $VAL2=trim($VAL2);
                    $POSP=stripos($VAL1[0],".");
                    echo $VAL2." ".$POSP."\n";
                }

Expected result:
----------------
s.schaefer 1
sschaefer 0

Actual result:
--------------
s.schaefer 1
sschaefer 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44427&edit=1

Reply via email to