PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net


 

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');
}
?>

Related discussion

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.txt · Last modified: 2009/05/02 05:48 by philip
 
Atom | show source | credits | stats | sitemap | contact | advertising | mirror sites