rfc:functionarraydereferencing

This is an old revision of the document!


Function Array Dereferencing (FAD)

  • Version: 0.2
  • Date: June 16, 2008 (added)
  • Date: May 01, 2009 (declined)
  • Author: Philip Olson philip@roshambo.org
  • Status: Declined

Introduction

Note: This RFC was given the “declined” status because it was never implemented or strongly desired. However, no official discussion exists to “decline” except CVS does not lie, and it's not in CVS.

This RFC is incomplete and 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.1262985105.txt.gz · Last modified: 2017/09/22 13:28 (external edit)