mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
37c8bb5868
Squashed commit of the following: commit0361dbe356
Author: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:59:20 2016 +0000 UPGRADING and NEWS commitdca9d4a36c
Author: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:45:18 2016 +0000 Add tests contributed by @jesseschalken commite557f77eab
Author: Andrea Faulds <ajf@ajf.me> Date: Fri Mar 25 16:44:51 2016 +0000 Rebuild VM commit70942e4c3c
Author: Andrea Faulds <ajf@ajf.me> Date: Wed Feb 24 13:12:26 2016 +0000 Add test for evaluation order of nested list() keys commited3592e80c
Author: Andrea Faulds <ajf@ajf.me> Date: Wed Feb 24 12:42:04 2016 +0000 Add test for evaluation order commit589756cbcc
Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 19 17:29:34 2016 +0000 Allow arbitrary expressions for key commit3f622077c3
Author: Andrea Faulds <ajf@ajf.me> Date: Tue Jan 19 17:45:10 2016 +0000 Remove compile-time HANDLE_NUMERIC (see bug #63217) commitbab758119a
Author: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 17 01:20:26 2016 +0000 Handle numeric strings commit14bfe93ddc
Author: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 17 01:09:36 2016 +0000 Allow trailing comma commitf4c8b2cb30
Author: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 23:47:11 2016 +0000 Add tests commit0085884a61
Author: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 22:24:23 2016 +0000 Handle non-integer/string opcodes commite572d2d0ad
Author: Andrea Faulds <ajf@ajf.me> Date: Sat Jan 16 21:10:33 2016 +0000 Disallow mixing keyed and unkeyed list() elements commitcede13ccfe
Author: Andrea Faulds <ajf@ajf.me> Date: Sun Jan 10 20:46:44 2016 +0000 list() with keys (no foreach or tests)
140 lines
4.8 KiB
Plaintext
140 lines
4.8 KiB
Plaintext
PHP 7.1 UPGRADE NOTES
|
|
|
|
1. Backward Incompatible Changes
|
|
2. New Features
|
|
3. Changes in SAPI modules
|
|
4. Deprecated Functionality
|
|
5. Changed Functions
|
|
6. New Functions
|
|
7. New Classes and Interfaces
|
|
8. Removed Extensions and SAPIs
|
|
9. Other Changes to Extensions
|
|
10. New Global Constants
|
|
11. Changes to INI File Handling
|
|
12. Windows Support
|
|
13. Other Changes
|
|
|
|
|
|
========================================
|
|
1. Backward Incompatible Changes
|
|
========================================
|
|
- Core:
|
|
. 'void' can no longer be used as the name of a class, interface, or trait.
|
|
This applies to declarations, class_alias() and use statements.
|
|
|
|
- JSON:
|
|
. When calling json_encode with JSON_UNESCAPED_UNICODE option, U+2028 and
|
|
U+2029 are escaped.
|
|
|
|
========================================
|
|
2. New Features
|
|
========================================
|
|
- 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)
|
|
. Added a form of the list() construct where keys can be specified.
|
|
(RFC: https://wiki.php.net/rfc/list_keys)
|
|
|
|
========================================
|
|
3. Changes in SAPI modules
|
|
========================================
|
|
|
|
========================================
|
|
4. Deprecated Functionality
|
|
========================================
|
|
|
|
========================================
|
|
5. Changed Functions
|
|
========================================
|
|
- get_headers() has an extra parameter which allows passing a custom stream
|
|
context.
|
|
- The first $varname argument for getenv() is no longer mandatory, the
|
|
current environment variables will be returned as an associative array
|
|
when omitted.
|
|
- json_encode() accepts new option JSON_UNESCAPED_LINE_TERMINATORS that
|
|
disables escaping of U+2028 and U+2029 characters when
|
|
JSON_UNESCAPED_UNICODE is supplied.
|
|
- long2ip() accepts integer as parameter now
|
|
- pg_last_notice() accepts optional long parameter to specify operation.
|
|
PGSQL_NOTICE_LAST - Get last notice (Default)
|
|
PGSQL_NOTICE_ALL - Get all stored notices
|
|
PGSQL_NOTICE_CLEAR - Remove all stored notices
|
|
It returns empty string or array on successful PGSQL_NOTICE_LAST/ALL calls.
|
|
It returned FALSE for empty notice previously.
|
|
- pg_fetch_all() accepts 2nd optional result type parameter like
|
|
pg_fetch_row().
|
|
- pg_select() accepts 4th optional result type parameter like pg_fetch_row().
|
|
- parse_url() is more restrictive now and supports RFC3986.
|
|
- 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 offsets.
|
|
- 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
|
|
========================================
|
|
|
|
========================================
|
|
7. New Classes and Interfaces
|
|
========================================
|
|
|
|
========================================
|
|
8. Removed Extensions and SAPIs
|
|
========================================
|
|
|
|
========================================
|
|
9. Other Changes to Extensions
|
|
========================================
|
|
- SQLite3:
|
|
. Upgraded bundled SQLite lib to 3.9.2
|
|
|
|
========================================
|
|
10. New Global Constants
|
|
========================================
|
|
|
|
- JSON:
|
|
. JSON_UNESCAPED_LINE_TERMINATORS
|
|
|
|
- Pgsql:
|
|
PGSQL_NOTICE_LAST
|
|
PGSQL_NOTICE_ALL
|
|
PGSQL_NOTICE_CLEAR
|
|
|
|
========================================
|
|
11. Changes to INI File Handling
|
|
========================================
|
|
|
|
========================================
|
|
12. Windows Support
|
|
========================================
|
|
|
|
- Core:
|
|
. Support for ftok()
|
|
|
|
- FCGI
|
|
. PHP_FCGI_CHILDREN is respected. If this environment variable is defined,
|
|
the first php-fcgi.exe process will exec the specified number of children.
|
|
Those will share the same TCP socket.
|
|
|
|
- readline:
|
|
. The readline extension is supported through the WinEditLine library
|
|
(http://mingweditline.sourceforge.net/). Thereby, the interactive CLI
|
|
shell is supported as well (php.exe -a).
|
|
|
|
It is well known, but nevertheless is worth mentioning again, that
|
|
the readline extension is not thread safe and will never be. Thus,
|
|
the usage of it with any true thread safe SAPI (like Apache mod_winnt) is
|
|
strongely discouraged.
|
|
|
|
========================================
|
|
13. Other Changes
|
|
========================================
|
|
|