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/02/01 17:17] – francois | 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.2 | + | * Version: 1.3 |
- | * Date: 2016-02-01 | + | * Date: 2016-02-18 |
* Author: François Laupretre < | * Author: François Laupretre < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 55: | Line 55: | ||
</ | </ | ||
- | ==== In functions ==== | + | ==== In built-in |
^ Function ^ Add support for ^ | ^ Function ^ Add support for ^ | ||
Line 70: | Line 70: | ||
| mb_strpos| Negative offset | | | mb_strpos| Negative offset | | ||
| mb_stripos| Negative offset | | | mb_stripos| Negative offset | | ||
- | |||
- | ==== In the documentation ==== | ||
- | |||
- | As suggested during the discussion, authorizing the same ' | ||
- | especially with the addition of negative string offsets, which won't be supported on arrays. | ||
- | |||
- | So, the documentation on www.php.net will be modified to recommend using the ' | ||
- | will open the way for a potential future deprecation of the ' | ||
==== Notes ==== | ==== Notes ==== | ||
Line 113: | 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 121: | 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.1454347072.txt.gz · Last modified: 2017/09/22 13:28 (external edit)