ID: 39853 User updated by: anton dot kirsanov at gmail dot com Reported By: anton dot kirsanov at gmail dot com Status: Open Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 4.4.4 New Comment:
Sorry, am mix up a 'Expected result' and 'Actual result' :) Please read this quite the contrary - 'Expected result' is a 'Actual result'. Previous Comments: ------------------------------------------------------------------------ [2006-12-16 12:35:36] ara at lenta dot ru ты хуй ------------------------------------------------------------------------ [2006-12-16 12:33:44] anton dot kirsanov at gmail dot com Description: ------------ strtoupper(), strtolower() function does not change string(as virtual vars - like $1(\\1)) what be returned a preg_replace function. Reproduce code: --------------- <?php // 1 $s = "A-B"; echo preg_replace("/\-([a-z])/iU", strtolower("$1"), $s); echo "\n"; // 2 $s = "a-b"; echo preg_replace("/\-([a-z])/iU", strtoupper("$1"), $s); // 3 $s = "B-B"; echo preg_replace("/([a-z]-[a-z])/i", strtolower("A-$1-A"), $s); ?> Expected result: ---------------- AB ab a-B-B-a Actual result: -------------- Ab aB abba ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39853&edit=1