note 20908 added to function.strtoupper

From: Date: Sun, 21 Apr 2002 09:55:33 +0000
Subject: note 20908 added to function.strtoupper
Groups: php.notes 
Request: Send a blank email to php-notes+get-29632@lists.php.net to get a copy of this message
I'd just like to bring to the attention of editors that some weird thing happened to me while trying to upper-case some letters of a string. I did something like that inside a loop where a char-counter was increasing: $newchar=ord($string[$count])-32; $string[$count]=chr($newchar); In most cases, it worked out perfectly: turning the $count char of $string into its upper version. BUT at some time, it simply turned the whole $string into upper. I verified every single bit of my code before trying anything else but had to work on a copy of the variable to get through this. (ex: $str_cpy[$count]=$chr($newchar);) Don't know if it's normal or if it's a bug, but that f*cker surely taught me how to swear. -- http://www.php.net/manual/en/function.strtoupper.php http://master.php.net/manage/user-notes.php?action=edit+20908 http://master.php.net/manage/user-notes.php?action=delete+20908 http://master.php.net/manage/user-notes.php?action=reject+20908

« previous php.notes (#29632) next »