#29068 [Opn->Bgs]: ambiguity of $$arrayref[0] []operator too strong
| From: | curt@php.net | Date: | Fri, 09 Jul 2004 00:43:19 +0000 |
| Subject: | #29068 [Opn->Bgs]: ambiguity of $$arrayref[0] []operator too strong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61944@lists.php.net to get a copy of this message | ||
ID: 29068
Updated by: curt@php.net
Reported By: steffen dot moeller at med dot uni-rostock dot de
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Linux
PHP Version: Irrelevant
New Comment:
see http://php.net/variables.variable
Previous Comments:
------------------------------------------------------------------------
[2004-07-09 01:01:04] steffen dot moeller at med dot uni-rostock dot de
Description:
------------
$$c is an array
$$c[0] is not defined
($$c)[0] is a syntax error
There seems not way to directly access the content of a
referenced array.
My PHP version is 4.3.4-4 of Debian unstable
Reproduce code:
---------------
$tmp=array("hello world");
$c="tmp";
$a=$$c; # works
echo $a[0]; # works
echo ($$c)[0]; # should work
echo {$$c}[0]; # would not mind if this was an alternative
Expected result:
----------------
"tmp"
Actual result:
--------------
syntax error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29068&edit=1