forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPGRADING
171 lines (147 loc) · 6.47 KB
/
UPGRADING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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.
. (int), intval() where $base is 10 or unspecified, settype(), decbin(),
decoct(), dechex(), integer operators and other conversions now always
respect scientific notation in numeric strings.
(RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic)
. The ASCII 0x7F Delete control character is no longer permitted in unquoted
identifiers in source code.
. The following functions may no longer be called dynamically using $func(),
call_user_func(), array_map() or similar:
. extract()
. compact()
. get_defined_vars()
. func_get_args()
. func_get_arg()
. func_num_args()
. parse_str() with one argument
. mb_parse_str() with one argument
. assert() with a string argument
(RFC: https://wiki.php.net/rfc/forbid_dynamic_scope_introspection)
- 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)
. Added [] = as alternative construct to list() =.
(RFC: https://wiki.php.net/rfc/short_list_syntax)
. Number operators taking numeric strings now emit "A non well formed numeric
value encountered" E_NOTICEs for leading-numeric strings, and "A
non-numeric value encountered" E_WARNINGs for non-numeric strings.
This always applies to the +, -, *, /, **, %, << and >> operators, and
their assignment counterparts +=, -=, *=, /=, **=, %=, <<= and >>=.
For the bitwise operators |, & and ^, and their assignment counterparts
|=, &= and ^=, this only applies where only one operand is a string.
Note that this never applies to the bitwise NOT operator, ~, which does not
handle numeric strings, nor to the increment and decrement operators
++ and --, which have a unique approach to handling numeric strings.
(RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic)
========================================
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
========================================