#30467 [Opn->Bgs]: Array expression parsing problem
| From: | derick@php.net | Date: | Mon, 18 Oct 2004 05:57:24 +0000 |
| Subject: | #30467 [Opn->Bgs]: Array expression parsing problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67712@lists.php.net to get a copy of this message | ||
ID: 30467
Updated by: derick@php.net
Reported By: cpks at btopenworld dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: N/A
PHP Version: Irrelevant
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
Nope, this is not supposed to work at all. No bug here.
Previous Comments:
------------------------------------------------------------------------
[2004-10-18 03:32:53] cpks at btopenworld dot com
Description:
------------
I had been assuming that the expression
$a = functioncall(), $a{operator}
is equivalent to
functioncall(){operator}
but this appears to be the untrue, at least in the case of functions
returning array values.
Be kind to me. I'm sure I'm being stupid.
Reproduce code:
---------------
echo getdate()["year"];
Expected result:
----------------
2004
//(or whatever year it is)
Actual result:
--------------
parse error: unexpected "[", expecting "," or ";"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30467&edit=1