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

 ID:               49439
 Updated by:       [email protected]
 Reported by:      zlobnygrif at gmail dot com
 Summary:          (unicode) and (string) types
-Status:           Open
+Status:           Wont fix
 Type:             Bug
 Package:          Unicode Engine related
 Operating System: FreeBSD 7.2-RELEASE
 PHP Version:      6SVN-2009-09-02 (snap)

 New Comment:

Old trunk related.


Previous Comments:
------------------------------------------------------------------------
[2009-09-02 09:50:54] zlobnygrif at gmail dot com

Description:
------------
ENG: Functions for working with strings return different types. Because
of this, for example, function strtr not working properly.



RUS: Ôóíêöèè äëÿ ðàáîòû ñî ñòðîêàìè âîçâðàùàþò ðàçíûå òèïû ðåñóðñîâ.
Èç-çà ýòîãî äðóãèå ôóíêöèè, íàïðèìåð strtr, ðàáîòàþò íåïðàâèëüíî.

Reproduce code:
---------------
$sour = 'hello';



ob_start();

echo $sour;

$buff = ob_get_clean();



var_dump($sour);

var_dump($buff);



var_dump($sour === $buff);

var_dump(substr($buff,0));



var_dump(strtr($buff, array($sour => 'HELLO')));

var_dump(strtr($buff, $sour, 'HELLO'));

Expected result:
----------------
unicode(5) "hello"

string(5) "hello"

bool(false)

string(5) "hello"

string(5) "hello"

unicode(5) "HELLO"

Actual result:
--------------
unicode(5) "hello"

unicode(5) "hello"

bool(true)

unicode(5) "hello"

unicode(5) "HELLO"

unicode(5) "HELLO"


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



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

Reply via email to