Bug #60525 [Opn->Bgs]: Array Index can automatically covert integer.
| From: | laruence@php.net | Date: | Wed, 14 Dec 2011 15:05:29 +0000 |
| Subject: | Bug #60525 [Opn->Bgs]: Array Index can automatically covert integer. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165863@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60525&edit=1
ID: 60525
Updated by: laruence@php.net
Reported by: 353880028 at qq dot com
Summary: Array Index can automatically covert integer.
-Status: Open
+Status: Bogus
Type: Bug
Package: *General Issues
Operating System: All
PHP Version: 5.4.0RC3
Block user comment: N
Private report: N
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
since $test["fruit"] is a string not a array, so same as $string["***"] =>
$string[0].
Previous Comments:
------------------------------------------------------------------------
[2011-12-14 14:52:13] 353880028 at qq dot com
Description:
------------
<?php
$test = array("fruit"=>"apple");
echo $test["fruit"]["like"];
//the result is "a"
//why? I think it should be notice that index is not found but intval("like")
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60525&edit=1