rfc:constdereference

This is an old revision of the document!


RFC: Const array/string dereference

Introduction

A small change to make things consistent.

Proposal

base on feature request: https://bugs.php.net/bug.php?id=60408 , I wrote a patch to make php support const array/string dereference

after patched, following script:

echo array(1, 2, 3)[0]; //output 1
echo "foobar"[2]; //output o
echo "foobar"["foo"][0] // output f

works.

Patches

Tests

Changelog

  • 2011-11-30 Xinchen Hui: Initial RFC creation
rfc/constdereference.1322633851.txt.gz · Last modified: 2017/09/22 13:28 (external edit)