Skip to content

Instantly share code, notes, and snippets.

@mikale
Created July 6, 2011 07:25
Show Gist options
  • Select an option

  • Save mikale/1066739 to your computer and use it in GitHub Desktop.

Select an option

Save mikale/1066739 to your computer and use it in GitHub Desktop.
<?php
function fruit () {
return array('a' => 'apple', 'b' => 'banana');
}
echo fruit()['a']; // apple
@md2perpe
Copy link

md2perpe commented Jul 6, 2011

Does this work? If so, what version of PHP does it need? 5.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment