|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-12 09:31 UTC] derick@php.net
[2011-01-02 10:49 UTC] semtlenori at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
Description: ------------ I would be nice if PHP 6.x can use operator [] with called function. Reproduce code: --------------- <? function f(){ return(array('a','b')); } print(f()[0]); ?> Expected result: ---------------- Like now: <? function f(){ return(array('a','b')); } $f=f(); print($f[0]); unset($f); ?> Actual result: -------------- Parse error: syntax error, unexpected '['