UPGRADING 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. PHP 8.1 UPGRADE NOTES
  2. 1. Backward Incompatible Changes
  3. 2. New Features
  4. 3. Changes in SAPI modules
  5. 4. Deprecated Functionality
  6. 5. Changed Functions
  7. 6. New Functions
  8. 7. New Classes and Interfaces
  9. 8. Removed Extensions and SAPIs
  10. 9. Other Changes to Extensions
  11. 10. New Global Constants
  12. 11. Changes to INI File Handling
  13. 12. Windows Support
  14. 13. Other Changes
  15. 14. Performance Improvements
  16. ========================================
  17. 1. Backward Incompatible Changes
  18. ========================================
  19. - Core:
  20. . Access to the $GLOBALS array is now subject to a number of restrictions.
  21. Read and write access to individual array elements like $GLOBALS['var']
  22. continues to work as-is. Read-only access to the entire $GLOBALS array also
  23. continues to be supported. However, write access to the entire $GLOBALS
  24. array is no longer supported. For example, array_pop($GLOBALS) will result
  25. in an error.
  26. RFC: https://wiki.php.net/rfc/restrict_globals_usage
  27. . Passing null to a non-nullable argument of a built-in function is
  28. deprecated. This matches the behavior of user-defined functions, where null
  29. is never accepted by non-nullable arguments.
  30. user-defined functions.
  31. var_dump(str_contains("foobar", null));
  32. // Deprecated: Passing null to parameter #2 ($needle) of type string
  33. // is deprecated
  34. RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
  35. . When a method using static variables is inherited (but not overridden), the
  36. inherited method will now share static variables with the parent method.
  37. class A {
  38. public static function counter() {
  39. static $counter = 0;
  40. $counter++;
  41. return $counter;
  42. }
  43. }
  44. class B extends A {}
  45. var_dump(A::counter()); // int(1)
  46. var_dump(A::counter()); // int(2)
  47. var_dump(B::counter()); // int(3), previously int(1)
  48. var_dump(B::counter()); // int(4), previously int(2)
  49. This means that static variables in methods now behave the same way as
  50. static properties.
  51. RFC: https://wiki.php.net/rfc/static_variable_inheritance
  52. . Most non-final internal methods now require overriding methods to declare a
  53. compatible return type, otherwise a deprecated notice is emitted during
  54. inheritance validation.
  55. In case the return type cannot be declared for an overriding method due to
  56. PHP cross-version compatibility concerns, a `#[ReturnTypeWillChange]`
  57. attribute can be added to silence the deprecation notice.
  58. RFC: https://wiki.php.net/rfc/internal_method_return_types
  59. - Fileinfo:
  60. . The fileinfo functions now accept and return, respectively, finfo objects
  61. instead of resources. Return value checks using is_resource()
  62. should be replaced with checks for `false`.
  63. - FTP:
  64. . The FTP functions now accept and return, respectively, FTP\Connection objects
  65. instead of resources. Return value checks using is_resource()
  66. should be replaced with checks for `false`.
  67. - IMAP:
  68. . The IMAP functions now accept and return, respectively, IMAP\Connection objects
  69. instead of resources. Return value checks using is_resource()
  70. should be replaced with checks for `false`.
  71. - LDAP:
  72. . The LDAP functions now accept and return, respectively, LDAP\Connection objects
  73. instead of "ldap link" resources. Return value checks using is_resource()
  74. should be replaced with checks for `false`.
  75. . The LDAP functions now accept and return, respectively, LDAP\Result objects
  76. instead of "ldap result" resources. Return value checks using is_resource()
  77. should be replaced with checks for `false`.
  78. . The LDAP functions now accept and return, respectively, LDAP\ResultEntry
  79. objects instead of "ldap result entry" resources. Return value checks using
  80. is_resource() should be replaced with checks for `false`.
  81. - MySQLi:
  82. . mysqli_fetch_fields() and mysqli_fetch_field_direct() will now always return
  83. zero for max_length. You can compute this information by iterating over the
  84. result set and taking the maximum length. This is what PHP was doing
  85. internally previously.
  86. . The MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH option no longer has an effect.
  87. . The MYSQLI_STORE_RESULT_COPY_DATA option no longer has an effect.
  88. . The default error handling mode has been changed from "silent" to
  89. "exceptions". See https://www.php.net/manual/en/mysqli-driver.report-mode.php
  90. for details of behavior changes and how to explicitly set this attribute. To
  91. keep the old behavior, use mysqli_report(MYSQLI_REPORT_OFF);
  92. RFC: https://wiki.php.net/rfc/mysqli_default_errmode
  93. . Classes extending mysqli_stmt::execute() will be required to specify the
  94. additional parameter now.
  95. RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
  96. . mysqli::connect() will now return true instead of null on success.
  97. - MySQLnd:
  98. . The mysqlnd.fetch_data_copy ini setting has been removed. However, this
  99. should not result in user-visible behavior changes.
  100. - OpenSSL:
  101. . EC private keys will now be exported in PKCS#8 format rather than
  102. traditional format, just like all other keys.
  103. . openssl_pkcs7_encrypt() and openssl_cms_encrypt() will now default to
  104. using AES-128-CBC rather than RC2-40. The RC2-40 cipher is considered
  105. insecure and not enabled by default in OpenSSL 3.
  106. - PDO:
  107. . PDO::ATTR_STRINGIFY_FETCHES now also stringifies values of type bool to
  108. "0" or "1". Previously booleans were not stringified.
  109. . Calling bindColumn() with PDO::PARAM_LOB (and assuming stringification is
  110. not enabled) will now consistently bind a stream result, as documented.
  111. Previously the result would be either a stream or a string depending on the
  112. used database driver and the time the binding is performed.
  113. - PDO MySQL:
  114. . Integers and floats in result sets will now be returned using native PHP
  115. types instead of strings when using emulated prepared statements. This
  116. matches the behavior of native prepared statements. You can restore the
  117. previous behavior by enabling the PDO::ATTR_STRINGIFY_FETCHES option.
  118. - PDO SQLite:
  119. . Integers and floats in results sets will now be returned using native PHP
  120. types. You can restore the previous behavior by enabling the
  121. PDO::ATTR_STRINGIFY_FETCHES option.
  122. - PgSQL:
  123. . The PgSQL functions now accept and return, respectively, \PgSql\Connection
  124. objects instead of "pgsql link" resources. Return value checks using
  125. is_resource() should be replaced with checks for `false`.
  126. . The PgSQL functions now accept and return, respectively, \PgSql\Result
  127. objects instead of "pgsql result" resources. Return value checks using
  128. is_resource() should be replaced with checks for `false`.
  129. . The PgSQL functions now accept and return, respectively, \PgSql\Lob
  130. objects instead of "pgsql large object" resources. Return value checks
  131. using is_resource() should be replaced with checks for `false`.
  132. - Phar:
  133. . To comply with the ArrayAccess interface, Phar::offsetUnset() and
  134. PharData::offsetUnset() no longer return a boolean.
  135. - PSpell:
  136. . The PSpell functions now accept and return, respectively, PSpell\Dictionary objects
  137. instead of "pspell" resources. Return value checks using is_resource()
  138. should be replaced with checks for `false`.
  139. . The PSpell functions now accept and return, respectively, PSpell\Config objects
  140. instead of "pspell config" resources. Return value checks using is_resource()
  141. should be replaced with checks for `false`.
  142. - Standard:
  143. . version_compare() no longer accepts undocumented operator abbreviations.
  144. . htmlspecialchars(), htmlentities(), htmlspecialchars_decode(),
  145. html_entity_decode() and get_html_translation_table() now use
  146. ENT_QUOTES | ENT_SUBSTITUTE rather than ENT_COMPAT by default. This means
  147. that ' is escaped to ' while previously it was left alone.
  148. Additionally, malformed UTF-8 will be replaced by a Unicode substitution
  149. character, instead of resulting in an empty string.
  150. . debug_zval_dump() will now print reference wrappers with their refcount,
  151. instead of only prepending a "&" to the value. This more accurately models
  152. reference representation since PHP 7.0.
  153. . debug_zval_dump() will now print "interned" instead of a dummy refcount of
  154. one for interned strings and immutable arrays.
  155. - SPL:
  156. . SplFixedArray will now be JSON encoded like an array.
  157. ========================================
  158. 2. New Features
  159. ========================================
  160. - Core:
  161. . It is now possible to specify octal integer by using the explicit "0o"/"0O"
  162. prefix similar to hexadecimal ("0x"/"0X) and binary ("0b"/"0B") integer
  163. literals.
  164. RFC: https://wiki.php.net/rfc/explicit_octal_notation
  165. . Added support for array unpacking with strings keys.
  166. RFC: https://wiki.php.net/rfc/array_unpacking_string_keys
  167. . Added support for enumerations.
  168. RFC: https://wiki.php.net/rfc/enumerations
  169. . Added support for never return type
  170. RFC: https://wiki.php.net/rfc/noreturn_type
  171. . Added support for fibers.
  172. RFC: https://wiki.php.net/rfc/fibers
  173. . It is now possible to use "new ClassName()" expressions as parameter
  174. default values, static variable and global constant initializers, as well
  175. as attribute arguments. Objects can also be passed to `define()` now.
  176. RFC: https://wiki.php.net/rfc/new_in_initializers
  177. . Closures for callables can now be created using the syntax `myFunc(...)`,
  178. which is the same as `Closure::fromCallable('myFunc')`. Yes, the `...` is
  179. part of the syntax, not an omission.
  180. RFC: https://wiki.php.net/rfc/first_class_callable_syntax
  181. . File uploads now provide an additional full_path key, which contains the
  182. full path (rather than just the basename) of the uploaded file. This is
  183. intended for use in conjunction with "upload webkitdirectory".
  184. . It is now allowed to specify named arguments after an argument unpack, e.g.
  185. foo(...$args, named: $arg).
  186. . Added support for intersection types.
  187. They cannot be combined with union types.
  188. RFC: https://wiki.php.net/rfc/pure-intersection-types
  189. . Added support for the final modifier for class constants.
  190. RFC: https://wiki.php.net/rfc/final_class_const
  191. . Added support for readonly properties.
  192. RFC: https://wiki.php.net/rfc/readonly_properties_v2
  193. - Curl:
  194. . Added CURLOPT_DOH_URL option.
  195. . Added certificate blob options when for libcurl >= 7.71.0:
  196. CURLOPT_ISSUERCERT_BLOB
  197. CURLOPT_PROXY_ISSUERCERT
  198. CURLOPT_PROXY_ISSUERCERT_BLOB
  199. CURLOPT_PROXY_SSLCERT_BLOB
  200. CURLOPT_PROXY_SSLKEY_BLOB
  201. CURLOPT_SSLCERT_BLOB
  202. CURLOPT_SSLKEY_BLOB
  203. . Added CURLStringFile, which can be used to post a file from a string rather
  204. than a file:
  205. $file = new CURLStringFile($data, 'filename.txt', 'text/plain');
  206. curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);
  207. - FPM:
  208. . Added openmetrics status format. It can be used by Prometheus to fetch FPM
  209. metrics.
  210. . Added new pool option for the dynamic process manager called
  211. pm.max_spawn_rate. It allows to start number of children in a faster rate
  212. when dynamic pm is selected. The default value is 32 which was the previous
  213. hard coded value.
  214. - GD:
  215. . Avif support is now available through the imagecreatefromavif() and
  216. imageavif() functions, if libgd has been built with avif support.
  217. - hash:
  218. . The following functions have changed signatures, to support an optional `$options` argument:
  219. - function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}
  220. - function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
  221. - function hash_init(string $algo, int $flags = 0, string $key = "", array $options = []): HashContext {}
  222. The additional `$options` argument can be used to pass algorithm specific data.
  223. . Added MurmurHash3 with streaming support. The following variants are implemented:
  224. - murmur3a, 32-bit hash
  225. - murmur3c, 128-bit hash for x86
  226. - murmur3f, 128-bit hash for x64
  227. The initial hash state can be passed through the `seed` key in the `$options` array, for example:
  228. ```php
  229. $h = hash("murmur3f", $data, options: ["seed" => 42]);
  230. echo $h, "\n";
  231. ```
  232. A valid seed value is within the range from 0 to the platform defined UINT_MAX, usually 4294967295.
  233. . Added xxHash. The implementation brings in the following arguments
  234. - xxh32, 32-bit hash
  235. - xxh64, 64-bit hash
  236. - xxh3, 64-bit hash
  237. - xxh128, 128-bit hash
  238. The initial hash state can be passed through the `seed` key in the `$options` array, for example:
  239. ```php
  240. $h = hash("xxh3", $data, options: ["seed" => 42]);
  241. echo $h, "\n";
  242. ```
  243. Secret usage is supported through passing the `secret` key in the `$options` array, too:
  244. ```php
  245. $h = hash("xxh3", $data, options: ["secret" => "at least 136 bytes long secret here"]);
  246. echo $h, "\n";
  247. ```
  248. Note, that the quality of the custom secret is crucial for the quality of the resulting hash. It is
  249. highly recommended for the secret to use the best possible entropy.
  250. - MySQLi:
  251. . The mysqli.local_infile_directory ini setting has been added, which can be
  252. used to specify a directory from which files are allowed to be loaded. It
  253. is only meaningful if mysqli.allow_local_infile is not enabled, as all
  254. directories are allowed in that case.
  255. . Binding in execute has been added to mysqli prepared statements.
  256. Parameters can now be passed to mysqli_stmt::execute as an array.
  257. RFC: https://wiki.php.net/rfc/mysqli_bind_in_execute
  258. . A new method has been added to mysqli_result called mysqli_fetch_column().
  259. It allows for fetching single scalar values from the result set.
  260. RFC: https://wiki.php.net/rfc/mysqli_fetch_column
  261. - PDO MySQL:
  262. . The PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY attribute has been added, which
  263. can be used to specify a directory from which files are allowed to be
  264. loaded. It is only meaningful if PDO::MYSQL_ATTR_LOCAL_INFILE is not
  265. enabled, as all directories are allowed in that case.
  266. - PDO SQLite:
  267. . SQLite's "file:" DSN syntax is now supported, which allows specifying
  268. additional flags. This feature is not available if open_basedir is set.
  269. Example:
  270. new PDO('sqlite:file:path/to/sqlite.db?mode=ro')
  271. - Posix:
  272. . Added POSIX_RLIMIT_KQUEUES and POSIX_RLIMIT_NPTS. These rlimits are only
  273. available on FreeBSD.
  274. - Standard:
  275. . fputcsv() now accepts a new "eol" argument which allow to define a custom
  276. eol sequence, the default remains the same and is "\n".
  277. - SPL:
  278. . SplFileObject::fputcsv() now accepts a new "eol" argument which allow to
  279. define a custom eol sequence, the default remains the same and is "\n".
  280. ========================================
  281. 3. Changes in SAPI modules
  282. ========================================
  283. - CLI:
  284. . Using -a without the readline extension will now result in an error.
  285. Previously, -a without readline had the same behavior as calling php without
  286. any arguments, apart from printing an additional "Interactive mode enabled"
  287. message. This mode was not, in fact, interactive.
  288. - phpdbg:
  289. . Remote functionality from phpdbg has been removed.
  290. ========================================
  291. 4. Deprecated Functionality
  292. ========================================
  293. - Core:
  294. . Implementing the Serializable interface without also implementing
  295. __serialize() and __unserialize() has been deprecated. You should either
  296. implement the new methods (if you only support PHP 7.4 and higher) or
  297. implement both (if you support older PHP versions as well).
  298. RFC: https://wiki.php.net/rfc/phase_out_serializable
  299. . Implicit conversion of floats to integers that result in loss of precision,
  300. e.g. a truncation from 1.9 to 1, is deprecated. This affects array keys,
  301. int parameter and return types, and operators working on integers.
  302. RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate
  303. . Calling a static method or accessing a static property directly on a trait
  304. is deprecated. Static methods and properties should only be accessed on a
  305. class using the trait.
  306. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  307. . Returning a non-array from __sleep will raise a warning
  308. . Returning by reference from a void function is deprecated.
  309. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  310. . Automatic conversion of "false" into an empty array on write operands is
  311. deprecated.
  312. RFC: https://wiki.php.net/rfc/autovivification_false
  313. - Ctype:
  314. . Passing a non-string value to ctype_*() functions is deprecated. A future
  315. version of PHP will make ctype_*() accept a string argument, which means
  316. that either only strings will be accepted (strict_types=1) or inputs may be
  317. converted to string (strict_types=0). In particular, using ctype_*($cp) to
  318. check whether an ASCII codepoint given as integer satisfies a given ctype
  319. predicate will no longer be supported. Instead ctype_*(chr($cp)) should be
  320. used.
  321. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  322. - Date:
  323. . The date_sunrise() and date_sunset() functions have been deprecated in
  324. favor of date_sun_info().
  325. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  326. . The strftime() and gmstrftime() functions have been deprecated in favor of
  327. date()/DateTime::format() (for locale-independent formatting) or
  328. IntlDateFormatter::format() (for locale-dependent formatting).
  329. - Filter:
  330. . The FILTER_SANITIZE_STRING and FILTER_SANITIZE_STRIPPED filters have been
  331. deprecated.
  332. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  333. . The filter.default ini setting is deprecated.
  334. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  335. - GD:
  336. . The $num_points parameter of image(open|filled)polygon has been deprecated.
  337. - Hash:
  338. . The mhash(), mhash_keygen_s2k(), mhash_count(), mhash_get_block_size() and
  339. mhash_get_hash_name() functions are deprecated. Use the hash_*() APIs
  340. instead.
  341. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  342. - IMAP:
  343. . The NIL constant has been deprecated. Use 0 instead.
  344. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  345. - Intl:
  346. . Calling IntlCalendar::roll() with bool argument is deprecated. Pass 1 and -1
  347. instead of true and false respectively.
  348. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  349. - Mbstring:
  350. . Calling mb_check_encoding() without an argument is deprecated.
  351. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  352. - MySQLi:
  353. . The mysqli_driver::$driver_version property has been deprecated. The driver
  354. version is meaningless as it hasn't been updated in more than a decade. Use
  355. PHP_VERSION_ID instead.
  356. . Calling mysqli::get_client_info in OO style or passing $mysqli argument to
  357. mysqli_get_client_info() function has been deprecated. Use
  358. mysqli_get_client_info() without any arguments to obtain the client
  359. library version information.
  360. . The mysqli::init() method has been deprecated. Replace calls to
  361. parent::init() with parent::__construct().
  362. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  363. - OCI8:
  364. . The INI directive oci8.old_oci_close_semantics has been deprecated.
  365. - ODBC:
  366. . odbc_result_all() has been deprecated.
  367. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  368. - PDO:
  369. . The PDO::FETCH_SERIALIZE mode has been deprecated.
  370. RFC: https://wiki.php.net/rfc/phase_out_serializable
  371. - PgSQL:
  372. . Not passing the connection argument to PgSQL functions and using the
  373. default connection is deprecated.
  374. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  375. - SOAP:
  376. . The ssl_method option for the SoapClient constructor has been deprecated in
  377. favor of ssl stream context options. The direct equivalent would be
  378. crypto_method, but min_proto_version/max_proto_version are recommended
  379. instead.
  380. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  381. - Standard:
  382. . Calling key(), current(), next(), prev(), reset(), or end() on objects
  383. is deprecated. Instead cast the object to array first, or make use of
  384. ArrayIterator.
  385. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  386. . The strptime() function has been deprecated. Use date_parse_from_format()
  387. instead (for locale-independent parsing) or IntlDateFormatter::parse() (for
  388. locale-dependent parsing).
  389. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  390. . The auto_detect_line_endings ini setting has been deprecated. If necessary,
  391. handle "\r" line breaks manually instead.
  392. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  393. . The FILE_BINARY and FILE_TEXT constants are deprecated. They already had
  394. no effect previously.
  395. RFC: https://wiki.php.net/rfc/deprecations_php_8_1
  396. ========================================
  397. 5. Changed Functions
  398. ========================================
  399. - Core:
  400. . Properties order used in foreach, var_dump(), serialize(), object comparison
  401. etc. was changed. Now properties are naturally ordered according to their
  402. declaration and inheritance. Properties declared in a base class are going
  403. to be before the child properties. This order is consistent with internal
  404. layout of properties in zend_object structure and repeats the order in
  405. default_properties_table[] and properties_info_table[]. The old order was
  406. not documented and was caused by class inheritance implementation details.
  407. - Filter:
  408. . The FILTER_FLAG_ALLOW_OCTAL flag of the FILTER_VALIDATE_INT filter now accept
  409. octal string with the leading octal prefix ("0o"/"0O")
  410. RFC: https://wiki.php.net/rfc/explicit_octal_notation
  411. - GMP:
  412. . All GMP function now accept octal string with the leading octal prefix ("0o"/"0O")
  413. RFC: https://wiki.php.net/rfc/explicit_octal_notation
  414. - PDO ODBC:
  415. . PDO::getAttributes() with PDO::ATTR_SERVER_INFO and PDO::ATTR_SERVER_VERSION
  416. now return values instead of throwing PDOException.
  417. - Reflection:
  418. . ReflectionProperty::setAccessible() and ReflectionMethod::setAccessible()
  419. no longer have an effect. Properties and methods are always considered
  420. accessible through reflection.
  421. RFC: https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
  422. - Standard:
  423. . syslog() is now binary safe.
  424. ========================================
  425. 6. New Functions
  426. ========================================
  427. - Core:
  428. . Added array_is_list(array $array), which will return true if the array keys are 0 .. count($array)-1 in that order.
  429. RFC: https://wiki.php.net/rfc/is_list
  430. - pcntl:
  431. . Added pcntl_rfork for FreeBSD variants
  432. - Reflection:
  433. . Added ReflectionFunctionAbstract::getClosureUsedVariables
  434. - Standard:
  435. . Added fsync() and fdatasync(), which instruct the operating system to
  436. flush its buffers to physical storage.
  437. RFC: https://wiki.php.net/rfc/fsync_function
  438. - Sodium:
  439. . Added the XChaCha20 stream cipher interface functions:
  440. - sodium_crypto_stream_xchacha20()
  441. - sodium_crypto_stream_xchacha20_keygen()
  442. - sodium_crypto_stream_xchacha20_xor()
  443. . Added the Ristretto255 functions, which are available in libsodium 1.0.18.
  444. Ristretto is a technique for constructing prime order elliptic curve groups with non-malleable encodings.
  445. Ristretto255 implements Ristretto atop Curve25519.
  446. - sodium_crypto_core_ristretto255_add()
  447. - sodium_crypto_core_ristretto255_from_hash()
  448. - sodium_crypto_core_ristretto255_is_valid_point()
  449. - sodium_crypto_core_ristretto255_random()
  450. - sodium_crypto_core_ristretto255_scalar_add()
  451. - sodium_crypto_core_ristretto255_scalar_complement()
  452. - sodium_crypto_core_ristretto255_scalar_invert()
  453. - sodium_crypto_core_ristretto255_scalar_mul()
  454. - sodium_crypto_core_ristretto255_scalar_negate()
  455. - sodium_crypto_core_ristretto255_scalar_random()
  456. - sodium_crypto_core_ristretto255_scalar_reduce()
  457. - sodium_crypto_core_ristretto255_scalar_sub()
  458. - sodium_crypto_core_ristretto255_sub()
  459. - sodium_crypto_scalarmult_ristretto255()
  460. - sodium_crypto_scalarmult_ristretto255_base()
  461. ========================================
  462. 7. New Classes and Interfaces
  463. ========================================
  464. - Intl:
  465. . Added IntlDatePatternGenerator to dynamically generate patterns to use with IntlDateFormatter.
  466. RFC: https://wiki.php.net/rfc/intldatetimepatterngenerator
  467. ========================================
  468. 8. Removed Extensions and SAPIs
  469. ========================================
  470. ========================================
  471. 9. Other Changes to Extensions
  472. ========================================
  473. - GD:
  474. imagewebp() can do lossless WebP encoding by passing IMG_WEBP_LOSSLESS as
  475. quality. This constant is only defined, if a libgd is used which supports
  476. lossless WebP encoding.
  477. - Mbstring:
  478. . Unicode data tables have been updated to Unicode 14.
  479. - MySQLi:
  480. . The mysqli_stmt::next_result() and mysqli::fetch_all() methods are now
  481. available when linking against libmysqlclient.
  482. - OpenSSL:
  483. . The OpenSSL extension now requires at least OpenSSL version 1.0.2.
  484. . OpenSSL 3.0 is now supported. Be aware that many ciphers are no longer
  485. enabled by default (part of the legacy provider), and that parameter
  486. validation (e.g. minimum key sizes) is stricter now.
  487. - Phar:
  488. . Use SHA256 by default for signature.
  489. . Add support for OpenSSL_SHA256 and OpenSSL_SHA512 signature.
  490. - SNMP:
  491. . add SHA256 and SHA512 for security protocol.
  492. - Standard:
  493. . --with-password-argon2 now uses pkg-config to detect libargon2. As such,
  494. an alternative libargon2 location should now be specified using
  495. PKG_CONFIG_PATH.
  496. . --with-external-libcrypt now allows to use system libcrypt/libxcrypt
  497. instead in PHP own implementation.
  498. ========================================
  499. 10. New Global Constants
  500. ========================================
  501. - MySQLi:
  502. . MYSQLI_REFRESH_REPLICA has been added as a replacement for
  503. MYSQLI_REFRESH_SLAVE, in line with an upstream change in MySQL. The old
  504. constant is still available for backwards-compatibility reasons, but may
  505. be deprecated/removed in the future.
  506. - Sockets:
  507. . The following socket options are now defined if they are supported:
  508. * SO_ACCEPTFILTER
  509. * SO_DONTTRUNC
  510. * SO_WANTMORE
  511. * SO_MARK
  512. * TCP_DEFER_ACCEPT
  513. ========================================
  514. 11. Changes to INI File Handling
  515. ========================================
  516. - The log_errors_max_len ini setting has been removed. It no longer had an
  517. effect since PHP 8.0.
  518. - A leading dollar in a quoted string can now be escaped: "\${" will now be
  519. interpreted as a string with contents `${`.
  520. - Backslashes in double quoted strings are now more consistently treated as
  521. escape characters. Previously, "foo\\" followed by something other than a
  522. newline was not considered as a teminated string. It is now interpreted as a
  523. string with contents `foo\`. However, as an exception, the string "foo\"
  524. followed by a newline will continue to be treated as a valid string with
  525. contents `foo\` rather than an unterminated string. This exception exists to
  526. support naive uses of Windows file pahts as "C:\foo\".
  527. ========================================
  528. 12. Windows Support
  529. ========================================
  530. ========================================
  531. 13. Other Changes
  532. ========================================
  533. ========================================
  534. 14. Performance Improvements
  535. ========================================