Bug #15533: Indexing a string variable with a text key returns 1st element of string
| From: | fred at observe dot co dot za | Date: | Wed, 13 Feb 2002 08:08:53 +0000 |
| Subject: | Bug #15533: Indexing a string variable with a text key returns 1st element of string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-226@lists.php.net to get a copy of this message | ||
From: fred@observe.co.za
Operating system: Linux
PHP version: 4.0.6
PHP Bug Type: Variables related
Bug description: Indexing a string variable with a text key returns 1st element of string
<?
$arg = '123';
// prints 123
echo "arg = $arg<br>\n";
// prints nothing
echo "is_array(arg) = ", is_array($arg), "<br>\n";
// prints 1
echo "arg[blah] = $arg[blah]<br>\n";
?>
--
Edit bug report at http://bugs.php.net/?id=15533&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15533&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15533&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15533&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15533&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15533&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15533&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15533&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15533&r=submittedtwice