From:             stephen dot fromm at verizon dot net
Operating system: irrelevant
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  No documentation on modifying a string by indexing and assignment

Description:
------------
The PHP documentation nowhere indicates whether it's legal to *modify* a
string by accessing an individual character in the string with the index
operator (curly braces) and an assignment statement, as in:
$str = '0123456789';
$str{4} = 'd';
// Now $str should be '0123d56789'

While it does work on my machine, I feel the behavior
should be documented, as
* for all I know, there may be strange side effects (given php's complex
copy semantics);
* using undocumented language features can result in code that doesn't age
or port well;
* this is a fundamental aspect of any computer language.



-- 
Edit bug report at http://bugs.php.net/?id=26414&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26414&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26414&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26414&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26414&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26414&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26414&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26414&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26414&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26414&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26414&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26414&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26414&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26414&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26414&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26414&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26414&r=float

Reply via email to