2020-10-09 15:21:39 +08:00
|
|
|
PHP 8.1 UPGRADE NOTES
|
2012-03-06 04:14:04 +08:00
|
|
|
|
|
|
|
1. Backward Incompatible Changes
|
|
|
|
2. New Features
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
|
|
|
4. Deprecated Functionality
|
|
|
|
5. Changed Functions
|
|
|
|
6. New Functions
|
|
|
|
7. New Classes and Interfaces
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
|
|
|
10. New Global Constants
|
|
|
|
11. Changes to INI File Handling
|
2014-08-22 19:35:07 +08:00
|
|
|
12. Windows Support
|
2019-01-28 17:34:31 +08:00
|
|
|
13. Other Changes
|
|
|
|
14. Performance Improvements
|
2010-03-25 00:23:50 +08:00
|
|
|
|
|
|
|
========================================
|
2012-03-06 04:14:04 +08:00
|
|
|
1. Backward Incompatible Changes
|
2010-03-25 00:23:50 +08:00
|
|
|
========================================
|
2016-04-25 05:49:52 +08:00
|
|
|
|
2020-12-14 02:00:51 +08:00
|
|
|
- Standard:
|
|
|
|
. version_compare() no longer accepts undocumented operator abbreviations.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
|
|
|
2. New Features
|
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2020-11-01 02:19:00 +08:00
|
|
|
- hash:
|
2020-12-13 23:36:57 +08:00
|
|
|
. The following functions have changed signatures:
|
|
|
|
|
|
|
|
- function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}
|
|
|
|
- function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
|
|
|
|
- function hash_init(string $algo, int $flags = 0, string $key = "", array $options = []): HashContext {}
|
|
|
|
|
|
|
|
The additional `$options` argument can be used to pass algorithm specific data.
|
|
|
|
|
|
|
|
. Added MurmurHash3 with streaming support. The following variants are implemented:
|
2020-11-01 02:19:00 +08:00
|
|
|
|
|
|
|
- murmur3a, 32-bit hash
|
|
|
|
- murmur3c, 128-bit hash for x86
|
|
|
|
- murmur3f, 128-bit hash for x64
|
|
|
|
|
2020-12-13 23:36:57 +08:00
|
|
|
The initial hash state can be passed through the `seed` key in the `$options` array, for example:
|
|
|
|
|
|
|
|
```php
|
|
|
|
$h = hash("murmur3f", $data, options: ["seed" => 42]);
|
|
|
|
echo $h, "\n";
|
|
|
|
```
|
|
|
|
|
|
|
|
A valid seed value is within the range from 0 to the plaform defined UINT_MAX, usually 4294967295.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
4. Deprecated Functionality
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
5. Changed Functions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-06-24 03:40:31 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
6. New Functions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2015-04-24 23:19:58 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
7. New Classes and Interfaces
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2016-07-03 18:43:30 +08:00
|
|
|
|
2020-10-11 04:02:26 +08:00
|
|
|
- OpenSSL:
|
|
|
|
. The OpenSSL extension now requires at least OpenSSL version 1.0.2.
|
|
|
|
|
2020-11-24 18:46:03 +08:00
|
|
|
- Standard:
|
|
|
|
. --with-password-argon2 now uses pkg-config to detect libargon2. As such,
|
|
|
|
an alternative libargon2 location should now be specified using
|
|
|
|
PKG_CONFIG_PATH.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
10. New Global Constants
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-03-25 00:23:50 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
11. Changes to INI File Handling
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-08-30 17:38:47 +08:00
|
|
|
|
2014-08-22 19:35:07 +08:00
|
|
|
========================================
|
|
|
|
12. Windows Support
|
|
|
|
========================================
|
|
|
|
|
2020-10-19 00:27:01 +08:00
|
|
|
. The macro IGNORE_URL_WIN has been removed; it had no effect as of PHP 5.0.0.
|
|
|
|
|
2019-01-15 17:13:39 +08:00
|
|
|
========================================
|
2019-01-28 17:34:31 +08:00
|
|
|
13. Other Changes
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2018-12-27 05:26:01 +08:00
|
|
|
|
|
|
|
========================================
|
2019-01-28 17:34:31 +08:00
|
|
|
14. Performance Improvements
|
2018-12-27 05:26:01 +08:00
|
|
|
========================================
|