rfc:negative-string-offsets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:negative-string-offsets [2016/01/25 16:10] – nikic | rfc:negative-string-offsets [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Generalize support of negative string offsets ====== | ====== PHP RFC: Generalize support of negative string offsets ====== | ||
- | * Version: 1.1 | + | * Version: 1.3 |
- | * Date: 2016-01-25 | + | * Date: 2016-02-18 |
* Author: François Laupretre < | * Author: François Laupretre < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 30: | Line 30: | ||
The main objective of this RFC is to improve the overall consistency of the language. | The main objective of this RFC is to improve the overall consistency of the language. | ||
- | ===== Feature requests solved by this RFC ===== | + | ==== Feature requests solved by this RFC ==== |
* https:// | * https:// | ||
Line 55: | Line 55: | ||
</ | </ | ||
- | ==== In functions ==== | + | ==== In built-in |
^ Function ^ Add support for ^ | ^ Function ^ Add support for ^ | ||
Line 71: | Line 71: | ||
| mb_stripos| Negative offset | | | mb_stripos| Negative offset | | ||
- | ===== Notes ===== | + | ==== Notes ==== |
* Nothing done for iconv_strrpos() because function does not accept an ' | * Nothing done for iconv_strrpos() because function does not accept an ' | ||
Line 105: | Line 105: | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
- | * Update documentation | + | To do (waiting for RFC approval) |
+ | |||
+ | * Update documentation | ||
+ | * Update language specifications | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== | ||
Line 113: | Line 116: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | None | + | ==== Recommend using ' |
+ | |||
+ | It was suggested during the discussion that, since array access and string | ||
+ | offsets are very different operations, the official documentation should | ||
+ | recommend using the ' | ||
+ | ' | ||
+ | |||
+ | On the opposite side, it was also suggested that array access and string offsets | ||
+ | are so closely-related concepts that we should recommend using ' | ||
+ | cases and disable the alternate ' | ||
+ | |||
+ | So, as the subject is controversial and very tangential to the subject of this RFC, | ||
+ | it will be left for a future RFC. | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
As this RFC adds support for negative string offsets in the language, it requires a 2/3 majority. | As this RFC adds support for negative string offsets in the language, it requires a 2/3 majority. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/negative-string-offsets.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1