Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

PHP 5.3 Anonymous Functions Not Yet Supported? #14

Closed
parris opened this issue Jul 8, 2010 · 2 comments
Closed

PHP 5.3 Anonymous Functions Not Yet Supported? #14

parris opened this issue Jul 8, 2010 · 2 comments

Comments

@parris
Copy link

parris commented Jul 8, 2010

Hello,
So I'd like to make a note that although this works:
function foo(){
return array('foo','bar');
}
echo foo()[1]; // output bar

this also works: echo array('foo','bar')[1]; // output bar

This does not work yet:
echo (function foo(){ return array('foo','bar');})()[1];

Which could potentially be useful... or maybe not, in any case it is not yet supported.
Thanks!!! WOO XHP!

@ghost ghost assigned Swahvay Feb 12, 2013
@steelbrain
Copy link
Contributor

This is not really a bug in XHP, but HHVM. and is duplicate of Bug #3890

@fredemmott
Copy link
Contributor

Closing as not related to XHP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants