rfc:constdereference
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:constdereference [2011/11/30 11:24] – laruence | rfc:constdereference [2013/10/29 17:22] – -> Implemented nikic | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2011-11-30 | * Date: 2011-11-30 | ||
* Author: Xinchen Hui < | * Author: Xinchen Hui < | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | A small change | + | |
+ | A little improvement | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | base on feature request: https:// | + | Base on feature request: https:// |
- | //Please add array constructor dereferencing support | + | |
+ | < | ||
+ | Please add array constructor dereferencing support | ||
like JavaScript, C# and all languages excluding PHP 5.4 | like JavaScript, C# and all languages excluding PHP 5.4 | ||
- | Test script: | ||
- | --------------- | ||
<?php | <?php | ||
Line 23: | Line 24: | ||
| | ||
- | ?>// | + | ?> |
- | + | </code> | |
- | I wrote a patch to make php support const array/string dereference | + | |
- | after patched, following script: | + | I wrote a patch to make php support const array/ |
<code php> | <code php> | ||
echo array(1, 2, 3)[0]; //output 1 | echo array(1, 2, 3)[0]; //output 1 | ||
Line 35: | Line 35: | ||
echo [1,3,4][2]; //output 4 | echo [1,3,4][2]; //output 4 | ||
</ | </ | ||
- | + | ===== Vote ===== | |
- | works. | + | <doodle |
+ | title=" | ||
+ | * yes | ||
+ | * no | ||
+ | </ | ||
===== Patches ===== | ===== Patches ===== | ||
- | | + | |
===== Tests ===== | ===== Tests ===== | ||
* http:// | * http:// | ||
Line 47: | Line 51: | ||
===== Changelog ===== | ===== Changelog ===== | ||
* 2011-11-30 Xinchen Hui: Initial RFC creation | * 2011-11-30 Xinchen Hui: Initial RFC creation | ||
+ | * 2011-12-13 Xinchen Hui: Start voting | ||
+ | * 2012-04-13 Xinchen Hui: Update patch, fixed issue spot by Dmitry | ||
+ | * 2012-04-13 Xinchen Hui: Close voting | ||
+ | * 2012-04-17 Xinchen Hui: Committed && Close |
rfc/constdereference.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1