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