rfc:functionarraydereferencing

This is an old revision of the document!


Function Array Dereferencing (FAD)

  • Version: 0.1
  • Date: June 16, 2008
  • Author: Philip Olson philip@roshambo.org
  • Status: Information Gathering

Introduction

This RFC is incomplete and [currently] exists as a historical record for the discussion of this feature request.

Proposal and Patch

No proposal, or patch, as this is simply information gathering for archival purposes.

Examples

FAD adds the following:

<?php
 
echo fruit()['a']; // apple
 
function fruit () {
  return array('a' => 'apple', 'b' => 'banana');
}
?>

Which is a quasi-replacement for this:

<?php
 
$fruits = fruit();
echo $fruits['a'];
 
function fruit () {
  return array('a' => 'apple', 'b' => 'banana');
}
?>

The following discussions/threads have taken place:

Where to go next

Tasks:

  • Find and list additional discussions about this topic
  • Research its implementation and impact
  • Write a proper RFC
rfc/functionarraydereferencing.1213651936.txt.gz · Last modified: 2017/09/22 13:28 (external edit)