From: cpks at btopenworld dot com Operating system: N/A PHP version: Irrelevant PHP Bug Type: *General Issues Bug description: Array expression parsing problem
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 bug report at http://bugs.php.net/?id=30467&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30467&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30467&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30467&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30467&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30467&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30467&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30467&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30467&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30467&r=support Expected behavior: http://bugs.php.net/fix.php?id=30467&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30467&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30467&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30467&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30467&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30467&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30467&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30467&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30467&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30467&r=mysqlcfg