PHP 4.0 Bug #3286 Updated: strtoupper bug
| From: | Bug Database | Date: | Fri, 09 Jun 2000 02:46:54 +0000 |
| Subject: | PHP 4.0 Bug #3286 Updated: strtoupper bug | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20653@lists.php.net to get a copy of this message | ||
ID: 3286
Updated by: zeev
Reported By: david@deus.dk
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:
Actually writing to string offsets is supported.
The code supplied just doesn't make much sense...
Why do you have both $content and $content_test?
<?php
$content = "test";
$content[0] = strtoupper($content[0]);
echo $content;
?>
works fine. In your example, you modify $content_test, and seem to expect $content to be changed as
well. Since $content and $content_test aren't references to each other, that doesn't
happen. You can make them references instead of copies by using
$content_test = &$content;
instead of the standard assignment you used.
Full Bug description available at: http://bugs.php.net/version4/?id=3286