Skip to content

Commit

Permalink
Add NEWS/UPGRADING for negative string offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Mar 9, 2016
1 parent d0d9e72 commit f65486f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ PHP NEWS
. Implemented the RFC `Support Class Constant Visibility`. (Sean DuBois,
Reeze Xia, Dmitry)
. Added void return type. (Andrea)
. Added support for negative string offsets in string offset syntax and
various string functions. (Francois)

- FTP:
. Implemented FR #55651 (Option to ignore the returned FTP PASV address).
Expand Down
8 changes: 8 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ PHP 7.1 UPGRADE NOTES
- Core
. Added void return type, which requires that a function not return a value.
(RFC: https://wiki.php.net/rfc/void_return_type)
. String offset access now supports negative references, which will be
counted from the end of the string.
(RFC: https://wiki.php.net/rfc/negative-string-offsets)

========================================
3. Changes in SAPI modules
Expand Down Expand Up @@ -66,6 +69,11 @@ PHP 7.1 UPGRADE NOTES
- unpack() accepts an additional optional $offset argument. '@' format code
(that specifes an absolute position) is applyed to input data after
the $offset argument.
- strpos(), stripos(), substr_count(), grapheme_strpos(), grapheme_stripos(),
grapheme_extract(), iconv_strpos(), mb_strimwidth(), mb_ereg_search_setpos(),
mb_strpos() and mb_stripos() now accept negative string offstes.
- substr_count() and mb_strimwidth() additionally also accept negative length.
- file_get_contents() accepts a negative seek offset if the stream is seekable.

========================================
6. New Functions
Expand Down

0 comments on commit f65486f

Please sign in to comment.