|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-09 02:43 UTC] curt@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 01:00:01 2025 UTC |
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