Edit report at https://bugs.php.net/bug.php?id=60589&edit=1
ID: 60589
User updated by: pehohlva at gmail dot com
Reported by: pehohlva at gmail dot com
Summary: str_replace error
Status: Open
Type: Bug
Package: *General Issues
Operating System: lenny debian
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
meant is: str_replace() doesnt recognise ascii 32 as whitespace / space.
Previous Comments:
------------------------------------------------------------------------
[2011-12-21 21:02:49] pehohlva at gmail dot com
Description:
------------
str_replace() error:
following construct delivers true on using phpexcelreader on ms excelfile as
$item if $item = ord($item)=32
that means, not all whitespaces where found with str_replaces()
Test script:
---------------
foreach($user as $key=>$item)
{
if(trim(str_replace(" ","",$item)) == "")
{
echo"<br>items:".ord($item);
}
}
output will be displayed with ascii 32 (space). Should be not possible.
Expected result:
----------------
dump->NULL
Actual result:
--------------
" " (space ascii 32
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60589&edit=1