#41506 [Opn->Bgs]: reassining string index to '' doesn't cause string length update

From: Date: Sat, 26 May 2007 12:26:01 +0000
Subject: #41506 [Opn->Bgs]: reassining string index to '' doesn't cause string length update
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113045@lists.php.net to get a copy of this message
ID: 41506 Updated by: johannes@php.net Reported By: shugotenshi at gmail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Linux (Ubuntu 7.04) PHP Version: 5.2.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The first character will be a Null-Byte after that operation which is not shown by your terminal/browser/... Previous Comments: ------------------------------------------------------------------------ [2007-05-26 10:14:17] shugotenshi at gmail dot com Description: ------------ PHP Version 5.2.1 (form wouldn't let me select this version) Reassigning a string index to '' doesn't modify the string's length. Reproduce code: --------------- $ php -r '$str = "foo"; $str{0} = ""; var_dump($str);' Expected result: ---------------- string(2) "oo" Actual result: -------------- string(3) "oo" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41506&edit=1

« previous php.bugs (#113045) next »