Edit report at http://bugs.php.net/bug.php?id=54635&edit=1
ID: 54635 User updated by: reto dot kohli at comvation dot com Reported by: reto dot kohli at comvation dot com Summary: Decrementing character variables does not work as expected -Status: Open +Status: Closed Type: Bug Package: Strings related Operating System: win32 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: It is documented... :( Previous Comments: ------------------------------------------------------------------------ [2011-04-29 15:57:28] reto dot kohli at comvation dot com Description: ------------ In the documentation (http://www.php.net/manual/en/language.operators.increment.php), "Example #1 Arithmetic Operations on Character Variables" shows how strings can be incremented. You would expect this to work the opposite way, too -- however, it doesn't. See the modified code from Example #1 attached. Test script: --------------- $i = 'W'; for ($n=0; $n<6; $n++) { echo --$i . "\n"; } Expected result: ---------------- V U T S R Q Actual result: -------------- W W W W W W ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54635&edit=1