@@ -64,23 +64,21 @@ PHP 8.1 UPGRADE NOTES
64
64
PHP cross-version compatibility concerns, a `#[ReturnTypeWillChange]`
65
65
attribute can be added to silence the deprecation notice.
66
66
RFC: https://wiki.php.net/rfc/internal_method_return_types
67
- . Added support for intersection types.
68
- They cannot be combined with union types.
69
- RFC: https://wiki.php.net/rfc/pure-intersection-types
70
- . Added support for the final modifier for class constants.
71
- RFC: https://wiki.php.net/rfc/final_class_const
72
67
73
68
- Fileinfo:
74
69
. The fileinfo functions now accept and return, respectively, finfo objects
75
- instead of resources.
70
+ instead of resources. Return value checks using is_resource()
71
+ should be replaced with checks for `false`.
76
72
77
73
- FTP:
78
74
. The FTP functions now accept and return, respectively, FTP\Connection objects
79
- instead of resources.
75
+ instead of resources. Return value checks using is_resource()
76
+ should be replaced with checks for `false`.
80
77
81
78
- IMAP:
82
79
. The IMAP functions now accept and return, respectively, IMAP\Connection objects
83
- instead of resources.
80
+ instead of resources. Return value checks using is_resource()
81
+ should be replaced with checks for `false`.
84
82
85
83
- LDAP:
86
84
. The LDAP functions now accept and return, respectively, LDAP\Connection objects
@@ -143,9 +141,6 @@ PHP 8.1 UPGRADE NOTES
143
141
. The PgSQL functions now accept and return, respectively, \PgSql\Lob
144
142
objects instead of "pgsql large object" resources. Return value checks
145
143
using is_resource() should be replaced with checks for `false`.
146
- . Not passing the connection argument to PgSQL functions and using the
147
- default connection is deprecated.
148
- RFC: https://wiki.php.net/rfc/deprecations_php_8_1
149
144
150
145
- Phar:
151
146
. To comply with the ArrayAccess interface, Phar::offsetUnset() and
@@ -172,12 +167,8 @@ PHP 8.1 UPGRADE NOTES
172
167
reference representation since PHP 7.0.
173
168
. debug_zval_dump() will not print "interned" instead of a dummy refcount of
174
169
one for interned strings and immutable arrays.
175
- . fputcsv() now accepts a new "eol" argument which allow to define a custom
176
- eol sequence, the default remains the same and is "\n".
177
170
178
171
- SPL:
179
- . SplFileObject::fputcsv() now accepts a new "eol" argument which allow to
180
- define a custom eol sequence, the default remains the same and is "\n".
181
172
. SplFixedArray will now be JSON encoded like an array.
182
173
183
174
========================================
@@ -210,6 +201,11 @@ PHP 8.1 UPGRADE NOTES
210
201
intended for use in conjunction with "upload webkitdirectory".
211
202
. It is now allowed to specify named arguments after an argument unpack, e.g.
212
203
foo(...$args, named: $arg).
204
+ . Added support for intersection types.
205
+ They cannot be combined with union types.
206
+ RFC: https://wiki.php.net/rfc/pure-intersection-types
207
+ . Added support for the final modifier for class constants.
208
+ RFC: https://wiki.php.net/rfc/final_class_const
213
209
214
210
- Curl:
215
211
. Added CURLOPT_DOH_URL option.
@@ -242,7 +238,7 @@ PHP 8.1 UPGRADE NOTES
242
238
imageavif() functions, if libgd has been built with avif support.
243
239
244
240
- hash:
245
- . The following functions have changed signatures:
241
+ . The following functions have changed signatures, to support an optional `$options` argument :
246
242
247
243
- function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}
248
244
- function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
@@ -297,7 +293,7 @@ PHP 8.1 UPGRADE NOTES
297
293
. Binding in execute has been added to mysqli prepared statements.
298
294
Parameters can now be passed to mysqli_stmt::execute as an array.
299
295
RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
300
- . A new function has been added to mysqli_result called mysqli_fetch_column().
296
+ . A new method has been added to mysqli_result called mysqli_fetch_column().
301
297
It allows for fetching single scalar values from the result set.
302
298
RFC: https://wiki.php.net/rfc/mysqli_fetch_column
303
299
@@ -318,6 +314,14 @@ PHP 8.1 UPGRADE NOTES
318
314
. Added POSIX_RLIMIT_KQUEUES and POSIX_RLIMIT_NPTS. These rlimits are only
319
315
available on FreeBSD.
320
316
317
+ - Standard:
318
+ . fputcsv() now accepts a new "eol" argument which allow to define a custom
319
+ eol sequence, the default remains the same and is "\n".
320
+
321
+ - SPL:
322
+ . SplFileObject::fputcsv() now accepts a new "eol" argument which allow to
323
+ define a custom eol sequence, the default remains the same and is "\n".
324
+
321
325
========================================
322
326
3. Changes in SAPI modules
323
327
========================================
@@ -420,6 +424,11 @@ PHP 8.1 UPGRADE NOTES
420
424
. The PDO::FETCH_SERIALIZE mode has been deprecated.
421
425
RFC: https://wiki.php.net/rfc/phase_out_serializable
422
426
427
+ - PgSQL:
428
+ . Not passing the connection argument to PgSQL functions and using the
429
+ default connection is deprecated.
430
+ RFC: https://wiki.php.net/rfc/deprecations_php_8_1
431
+
423
432
- SOAP:
424
433
. The ssl_method option for the SoapClient constructor has been deprecated in
425
434
favor of ssl stream context options. The direct equivalent would be
@@ -582,8 +591,6 @@ PHP 8.1 UPGRADE NOTES
582
591
12. Windows Support
583
592
========================================
584
593
585
- . The macro IGNORE_URL_WIN has been removed; it had no effect as of PHP 5.0.0.
586
-
587
594
========================================
588
595
13. Other Changes
589
596
========================================
0 commit comments