ID: 27457 Updated by: [EMAIL PROTECTED] Reported By: solace at ezmail dot ru -Status: Open +Status: Assigned Bug Type: Zend Engine 2 problem -Operating System: Win2K +Operating System: * -PHP Version: 5.0.0b4 (beta4) +PHP Version: 5CVS-2004-03-09 Assigned To: andi
Previous Comments: ------------------------------------------------------------------------ [2004-03-02 04:12:56] [EMAIL PROTECTED] Recategorize bug. ------------------------------------------------------------------------ [2004-03-02 03:40:08] solace at ezmail dot ru Description: ------------ I wanted to test compatibility of my scripts with the latest php5 beta and discovered very strange results. Well, something is wrong with strtr() function working with translation array. It worked fine with php 4.x.x. But strtr() with strings still works. I'm using command-line php.exe with -n switch, without php.ini or any modules. Reproduce code: --------------- $test = "Dot in brackets [.]\n"; $test = strtr($test, array('.' => '0')); // doesn't work ??? $test = strtr($test, array('0' => '.')); echo $test; // but this works!!! $test = strtr($test, '0', '.'); echo $test; Expected result: ---------------- Dot in brackets [.] Actual result: -------------- Dot in brackets [0] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27457&edit=1