1PHP 8.3 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 . Programs that were very close to overflowing the call stack may now throw an 24 Error when using more than 25 `zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack 26 (`fiber.stack_size-zend.reserved_stack_size` for fibers). 27 . Executing proc_get_status() multiple times will now always return the right 28 value on posix systems. Previously, only the first call of the function 29 returned the right value. Executing proc_close() after proc_get_status() 30 will now also return the right exit code. Previously this would return -1. 31 Internally, this works by caching the result on posix systems. If you want 32 the old behaviour, you can check the "cached" key in the array returned by 33 proc_get_status() to check whether the result was cached. 34 . Zend Max Execution Timers is now enabled by default for ZTS builds on 35 Linux. 36 . Uses of traits with static properties will now redeclare static properties 37 inherited from the parent class. This will create a separate static 38 property storage for the current class. This is analogous to adding the 39 static property to the class directly without traits. 40 . Assigning a negative index n to an empty array will now make sure that the 41 next index is n+1 instead of 0. 42 . Class constant visibility variance is now correctly checked when inherited 43 from interfaces. 44 . WeakMaps entries whose key maps to itself (possibly transitively) may now 45 be removed during cycle collection if the key is not reachable except by 46 iterating over the WeakMap (reachability via iteration is considered weak). 47 Previously, such entries would never be automatically removed. 48 49- DOM: 50 . DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith() 51 on a node that has no parent is now a no-op instead of a hierarchy 52 exception, which is the behaviour spec demands. 53 . Using the DOMParentNode and DOMChildNode methods without a document now 54 works instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in 55 line with the behaviour spec demands. 56 . createAttributeNS() without specifying a prefix would incorrectly create 57 a default namespace, placing the element inside the namespace instead of 58 the attribute. This bug is now fixed. 59 . createAttributeNS() would previously incorrectly throw a NAMESPACE_ERR 60 when the prefix was already used for a different uri. It now correctly 61 chooses a different prefix when there's a prefix name conflict. 62 . New methods and properties were added to some DOM classes. If you inherit 63 from these and you happen to have a method or property with the same name, 64 you might encounter errors if the declaration is incompatible. 65 Consult sections 2. New Features and 6. New Functions for a list of 66 newly implemented methods and properties. 67 68- FFI: 69 . C functions that have a return type of void now return null instead of 70 returning the following object object(FFI\CData:void) { } 71 72- Opcache: 73 . The opcache.consistency_checks INI directive was removed. This feature was 74 broken with the tracing JIT, as well as with inheritance cache, and has 75 been disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. 76 Both the tracing JIT and inheritance cache may modify shm after the script 77 has been persisted by invalidating its checksum. The attempted fix skipped 78 over the modifiable pointers but was rejected due to complexity. For this 79 reason, it was decided to remove the feature instead. 80 81- Phar: 82 . The type of Phar class constants are now declared. 83 84- Standard: 85 . The range() function has had various changes: 86 * A TypeError is now thrown when passing objects, resources, or arrays 87 as the boundary inputs 88 * A more descriptive ValueError is thrown when passing 0 for $step 89 * A ValueError is now thrown when using a negative $step for increasing ranges 90 * If $step is a float that can be interpreted as an int, it is now done so 91 * A ValueError is now thrown if any argument is infinity or NAN 92 * An E_WARNING is now emitted if $start or $end is the empty string. 93 The value continues to be cast to the value 0. 94 * An E_WARNING is now emitted if $start or $end has more than one byte, 95 only if it is a non-numeric string. 96 * An E_WARNING is now emitted if $start or $end is cast to an integer 97 because the other boundary input is a number. (e.g. range(5, 'z');) 98 * An E_WARNING is now emitted if $step is a float when trying to generate 99 a range of characters, except if both boundary inputs are numeric strings 100 (e.g. range('5', '9', 0.5); does not produce a warning) 101 * range() now produce a list of characters if one of the boundary inputs is 102 a string digit instead of casting the other input to int 103 (e.g. range('5', 'z');) 104 . The file() flags error check now catches all invalid flags. Notably 105 FILE_APPEND was previously silently accepted. 106 107- SNMP: 108 . The type of SNMP class constants are now declared. 109 110======================================== 1112. New Features 112======================================== 113 114- Core 115 . Anonymous classes may now be marked as readonly. 116 . Readonly properties can now be reinitialized during cloning. 117 RFC: https://wiki.php.net/rfc/readonly_amendments 118 . Class, interface, trait, and enum constants now support type 119 declarations. RFC: https://wiki.php.net/rfc/typed_class_constants 120 . Closures created from magic methods can now accept named arguments. 121 . The final modifier may now be used when using a method from a trait. 122 . Added the #[\Override] attribute to check that a method exists 123 in a parent class or implemented interface. 124 RFC: https://wiki.php.net/rfc/marking_overriden_methods 125 . Class constants can now be accessed dynamically using the C::{$name} 126 syntax. 127 RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch 128 . Static variable initializers can now contain arbitrary expressions. 129 RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers 130 131- CLI 132 . It is now possible to lint multiple files. 133 134- DOM 135 . Added properties DOMElement::className and DOMElement::id. 136 These are not binary-safe at the moment because of underlying limitations of 137 libxml2. This means that the property values will be cut off at a NUL byte. 138 . Added properties DOMNode::isConnected and DOMNameSpaceNode::isConnected. 139 . Added properties DOMNode::parentElement and DOMNameSpaceNode::parentElement. 140 141- FFI 142 . It is now possible to assign CData to other CData. This means you can 143 now assign CData to structs and fields. 144 145- Opcache 146 . opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix 147 timestamp of when the next revalidation of the scripts timestamp is due, 148 dictated by the opcache.revalidate_freq INI directive. 149 150- Posix 151 . posix_getrlimit() now takes an optional $res parameter to allow fetching a 152 single resource limit. 153 . posix_isatty() now raises type warnings for integers following the usual 154 ZPP semantics. 155 . posix_ttyname() now raises type warnings for integers following the usual 156 ZPP semantics and value warnings for invalid file descriptor integers. 157 158- Streams 159 . Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was 160 previously not implemented. 161 162======================================== 1633. Changes in SAPI modules 164======================================== 165 166- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed to 167 make it compliant with RFC3875. 168 169======================================== 1704. Deprecated Functionality 171======================================== 172 173- Core 174 . Using the ++ operator on empty, non-numeric, or non-alphanumeric strings 175 is now deprecated. Moreover, incrementing non-numeric strings is soft 176 deprecated and the new str_increment() function should be used instead. 177 RFC: https://wiki.php.net/rfc/saner-inc-dec-operators 178 . Using the -- operator on empty or non-numeric strings is now deprecated. 179 RFC: https://wiki.php.net/rfc/saner-inc-dec-operators 180 . Calling get_class() and get_parent_class() without arguments is now 181 deprecated. 182 183- DBA 184 . Calling dba_fetch() with $dba as the 3rd argument is now deprecated. 185 186- FFI 187 . Calling FFI::cast(), FFI::new(), and FFI::type() statically is now 188 deprecated. 189 190- Intl 191 . The U_MULTIPLE_DECIMAL_SEP*E*RATORS constant had been deprecated, using 192 the U_MULTIPLE_DECIMAL_SEP*A*RATORS instead is recommended. 193 . The NumberFormatter::TYPE_CURRENCY has been deprecated. 194 195- LDAP 196 . Calling ldap_connect() with separate hostname and port is deprecated. 197 RFC: https://wiki.php.net/rfc/deprecations_php_8_3#deprecate_calling_ldap_connect_with_2_parameters 198 199- MBString 200 . Passing a negative $width to mb_strimwidth() is now deprecated. 201 202- Phar 203 . Calling Phar::setStub() with a resource and a length is now deprecated. 204 Such calls should be replaced by: 205 $phar->setStub(stream_get_contents($resource)); 206 207- Random 208 . The MT_RAND_PHP Mt19937 variant is deprecated. 209 RFC: https://wiki.php.net/rfc/deprecations_php_8_3#mt_rand_php 210 211- Standard: 212 . The assert_options() function is now deprecated. 213 . The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and 214 ASSERT_WARNING constants have been deprecated. 215 RFC: https://wiki.php.net/rfc/assert-string-eval-cleanup 216 217- SQLite3 218 . Using exceptions is now preferred, warnings will be removed in the future. 219 Calling SQLite3::enableExceptions(false) will trigger a depreciation 220 warning in this version. 221 222- Zip: 223 . The ZipArchive::FL_RECOMPRESS constant is deprecated and will be removed 224 in a future version of libzip 225 226======================================== 2275. Changed Functions 228======================================== 229 230- Core: 231 . gc_status() has added the following 8 fields: 232 "running" => bool 233 "protected" => bool 234 "full" => bool 235 "buffer_size" => int 236 "application_time" => float: Total application time, in seconds (including 237 collector_time) 238 "collector_time" => float: Time spent collecting cycles, in seconds 239 (including destructor_time and free_time) 240 "destructor_time" => float: Time spent executing destructors during 241 cycle collection, in seconds 242 "free_time" => float: Time spent freeing values during cycle collection, in 243 seconds 244 See GH-9336, GH-11523 245 . class_alias() now supports creating an alias of an internal class. 246 . Setting `open_basedir` at runtime using `ini_set('open_basedir', ...);` no 247 longer accepts paths containing the parent directory (`..`). Previously, 248 only paths starting with `..` were disallowed. This could easily be 249 circumvented by prepending `./` to the path. 250 . User exception handlers now catch exceptions during shutdown. 251 . The resultant HTML of highlight_string and highlight_file has changed. 252 Whitespace between outer HTML tags is removed. Newlines and spaces 253 are no longer converted to HTML entities. The whole HTML is now wrapped in 254 <pre> tag. The outer <span> has been merged with <code>. 255 256- Calendar 257 . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit 258 systems, previously it only supported years in the range from 1970 to 2037. 259 260- Curl: 261 . curl_getinfo() now supports two new constants: CURLINFO_CAPATH and 262 CURLINFO_CAINFO. If option is null, the following two additional keys are 263 present: "capath" and "cainfo". 264 265- Dom: 266 . Changed DOMCharacterData::appendData() tentative return type to true. 267 . DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), 268 DOMDocument::loadXML() and DOMDocument::loadXMLFile() now have a tentative 269 return type of bool. Previously, this was documented as having a return 270 type of DOMDocument|bool, but DOMDocument cannot be returned since PHP 8.0 271 as it is no longer statically callable. 272 273- Gd: 274 . Changed imagerotate signature, removed the `ignore_transparent` argument 275 as it was not used internally anyway from PHP 7.x. 276 277- Intl: 278 . datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone) 279 now returns true on success, previously null was returned. 280 . IntlBreakiterator::setText() now returns false on failure, previously 281 null was returned. 282 now returns true on success, previously null was returned. 283 . IntlChar::enumCharNames is now returning a boolean. 284 Previously it returned null on success and false on failure. 285 . IntlDateFormatter::construct throws an U_ILLEGAL_ARGUMENT_ERROR 286 exception when an invalid locale had been set. 287 288- MBString: 289 . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional 290 casing rules for the Greek letter sigma. For mb_convert_case, conditional 291 casing only applies to MB_CASE_LOWER and MB_CASE_TITLE modes, not to 292 MB_CASE_LOWER_SIMPLE and MB_CASE_TITLE_SIMPLE. 293 . mb_decode_mimeheader interprets underscores in QPrint-encoded MIME 294 encoded words as required by RFC 2047; they are converted to spaces. 295 Underscores must be encoded as "=5F" in such MIME encoded words. 296 . In rare cases, mb_encode_mimeheader will transfer-encode its input 297 string where it would pass it through as raw ASCII in PHP 8.2. 298 . mb_encode_mimeheader no longer drops NUL (zero) bytes when 299 QPrint-encoding the input string. This previously caused strings in 300 certain text encodings, especially UTF-16 and UTF-32, to be 301 corrupted by mb_encode_mimeheader. 302 . mb_detect_encoding's "non-strict" mode now behaves as described in the 303 documentation. Previously, it would return false if the same byte 304 (for example, the first byte) of the input string was invalid in all 305 candidate encodings. More generally, it would eliminate candidate 306 encodings from consideration when an invalid byte was seen, and if the 307 same input byte eliminated all remaining encodings still under 308 consideration, it would return false. On the other hand, if all candidate 309 encodings but one were eliminated from consideration, it would return the 310 last remaining one without regard for how many encoding errors might be 311 encountered later in the string. This is different from the behavior 312 described in the documentation, which says: "If strict is set to false, 313 the closest matching encoding will be returned." 314 315- mysqli: 316 . mysqli_fetch_object now raises a ValueError instead of an Exception when 317 the constructor_args argument is non empty with the class not having 318 constructor. 319 . mysqli_poll now raises a ValueError when the read nor error arguments are 320 passed. 321 . mysqli_field_seek and mysqli_result::field_seek now specify return type 322 as true instead of bool. 323 324- ODBC 325 . odbc_autocommit() now accepts null for the $enable parameter. 326 Passing null has the same behaviour as passing only 1 parameter, 327 namely indicating if the autocommit feature is enabled or not. 328 329- PGSQL: 330 . pg_fetch_object now raises a ValueError instead of an Exception when the 331 constructor_args argument is non empty with the class not having 332 constructor. 333 . pg_insert now raises a ValueError instead of a WARNING when the table 334 specified is invalid. 335 . pg_insert and pg_convert raises a ValueError or a TypeError instead of a 336 WARNING when the value/type of a field does not match properly with a 337 PostGreSQL's type. 338 . The $row param of pg_fetch_result(), pg_field_prtlen() and 339 pg_field_is_null() is now nullable. 340 341- Random: 342 . Changed mt_srand() and srand() to not check the number of arguments to 343 determine whether a random seed should be used. Passing null will generate 344 a random seed, 0 will use zero as the seed. The functions are now 345 consistent with Mt19937::__construct(). 346 347- Reflection: 348 . Return type of ReflectionClass::getStaticProperties() is no longer nullable. 349 . Calling ReflectionProperty::setValue() with only one parameter is deprecated. 350 To set static properties, pass null as the first parameter. 351 352- Standard: 353 . E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. 354 RFC: https://wiki.php.net/rfc/improve_unserialize_error_handling 355 . unserialize() now emits a new E_WARNING if the input contains unconsumed 356 bytes. 357 RFC: https://wiki.php.net/rfc/unserialize_warn_on_trailing_data 358 . array_pad() is now only limited by the maximum number of elements an array 359 can have. Before, it was only possible to add at most 1048576 elements at a 360 time. 361 . strtok() raises a warning in the case token is not provided when starting 362 tokenization. 363 . password_hash() will now chain the underlying Random\RandomException 364 as the ValueError’s $previous Exception when salt generation fails. 365 . proc_open() $command array must now have at least one non empty element. 366 . proc_open() returns false if $command array is invalid command instead of 367 resource object that produces warning later. This was already the case for 368 Windows but it is now also the case if posix_spawn implementation is in use 369 (most Linux, BSD and MacOS platforms). There are still some old platforms 370 where this behavior is not changed as posix_spawn is not supported there. 371 . array_sum() and array_product() now warn when values in the array cannot 372 be converted to int/float. Previously arrays and objects where ignored 373 whilst every other value was cast to int. Moreover, objects that define 374 a numeric cast (e.g. GMP) are now casted instead of ignored. 375 RFC: https://wiki.php.net/rfc/saner-array-sum-product 376 . number_format() $decimal parameter handles rounding to negative places. It 377 means that when $decimals is negative, $num is rounded to $decimals 378 significant digits before the decimal point. Previously negative $decimals 379 got silently ignored and the number got rounded to zero decimal places. 380 . The $before_needle argument added to strrchr() which works in the same way 381 like its counterpart in strstr() or stristr(). 382 . str_getcsv() and fgetcsv() return empty string instead of a string with 383 a single zero byte for the last field which contains only unterminated 384 enclosure. 385 386======================================== 3876. New Functions 388======================================== 389 390- Date: 391 . Added DatePeriod::createFromISO8601String() as a replacement for the 392 overloaded constructor of DatePeriod. 393 394- DOM: 395 . Added DOMNode::contains() and DOMNameSpaceNode::contains(). 396 . Added DOMElement::getAttributeNames(). 397 . Added DOMNode::getRootNode(). The $options argument does nothing at the 398 moment because it only influences the shadow DOM, which we do not support 399 yet. 400 . Added DOMParentNode::replaceChildren(). 401 . Added DOMNode::isEqualNode(). 402 . Added DOMElement::insertAdjacentElement() and 403 DOMElement::insertAdjacentText(). 404 . Added DOMElement::toggleAttribute(). 405 406- Intl: 407 . Added IntlCalendar::setDate() and IntlCalendar::setDateTime() 408 as partial replacements for the overloaded IntlCalendar::set() method. 409 . Added IntlGregorianCalendar::createFromDate() and 410 IntlGregorianCalendar::createFromDateTime() 411 as partial replacements for the overloaded IntlGregorianCalendar 412 constructor. 413 414- JSON: 415 . Added json_validate(), which returns whether the json is valid for 416 the given $depth and $options. 417 RFC: https://wiki.php.net/rfc/json_validate 418 419- LDAP: 420 . Added ldap_connect_wallet(). 421 . Added ldap_exop_sync(). 422 423- MBString: 424 . Added mb_str_pad(), which is the mbstring equivalent of str_pad(). 425 RFC: https://wiki.php.net/rfc/mb_str_pad 426 427- Posix: 428 . Added posix_sysconf call to get runtime informations. 429 . Added posix_pathconf call to get configuration value from a directory/file. 430 . Added posix_fpathconf call to get configuration value from a file 431 descriptor. 432 . Added posix_eaccess call to check the effective user id's permission for 433 a path. 434 435- PGSQL: 436 . Added pg_set_error_context_visibility to set the visibility of the context 437 in error messages (with libpq >= 9.6). 438 439- Random: 440 . Added Randomizer::getBytesFromString(). 441 RFC: https://wiki.php.net/rfc/randomizer_additions 442 . Added Randomizer::nextFloat(), ::getFloat(), and IntervalBoundary. 443 RFC: https://wiki.php.net/rfc/randomizer_additions 444 445- Reflection: 446 . Added ReflectionMethod::createFromMethodName(). 447 448- Sockets: 449 . Added socket_atmark to checks if the socket is OOB marked. 450 451- Standard: 452 . Added the str_increment() and str_decrement() functions. 453 RFC: https://wiki.php.net/rfc/saner-inc-dec-operators 454 . Added stream_context_set_options() as a replacement for 455 stream_context_set_option() when passed an array of options. 456 457- Zip: 458 . Added ZipArchive::setArchiveFlag and ZipArchive::getArchiveFlag methods. 459 460======================================== 4617. New Classes and Interfaces 462======================================== 463 464======================================== 4658. Removed Extensions and SAPIs 466======================================== 467 468======================================== 4699. Other Changes to Extensions 470======================================== 471 472- Core: 473 . WeakMaps now have ephemeron-like behavior: Entries whose key maps to itself 474 (possibly transitively) may be removed during cycle collection if the key 475 is not reachable except by iterating over the WeakMap (reachability via 476 iteration is considered weak). Previously, such entries would never be 477 automatically removed. (See GH-10932.) 478 . The ++ and -- operators now emit warnings when attempting to increment 479 values of type bool as this will change in the next major version. 480 A warning is emitted when trying to decrement values of type null, as 481 this will change in the next major version. 482 Internal objects that implement an _IS_NUMBER cast but not a do_operator 483 handler that overrides addition and subtraction now can be incremented 484 and decrement as if one would do $o += 1 or $o -= 1 485 486- DOM: 487 . The DOM lifetime mechanism has been reworked such that implicitly removed 488 nodes can still be fetched. Previously this resulted in an exception. 489 490- SQLite3 491 . The SQLite3 class now throws \SQLite3Exception (extends \Exception) instead 492 of \Exception. 493 . The SQLite error code is now passed in the exception error code instead of 494 being included in the error message. 495 496======================================== 49710. New Global Constants 498======================================== 499 500- Curl: 501 . CURLINFO_CAPATH 502 . CURLINFO_CAINFO 503 . CURLOPT_MIME_OPTIONS 504 . CURLMIMEOPT_FORMESCAPE 505 . CURLOPT_WS_OPTIONS 506 . CURLWS_RAW_MODE 507 . CURLOPT_SSH_HOSTKEYFUNCTION 508 . CURLOPT_PROTOCOLS_STR 509 . CURLOPT_REDIR_PROTOCOLS_STR 510 . CURLOPT_CA_CACHE_TIMEOUT 511 . CURLOPT_QUICK_EXIT 512 . CURLKHMATCH_OK 513 . CURLKHMATCH_MISMATCH 514 . CURLKHMATCH_MISSING 515 . CURLKHMATCH_LAST 516 517- Intl: 518 . MIXED_NUMBERS (Spoofchecker). 519 . HIDDEN_OVERLAY (Spoofchecker). 520 521- OpenSSL: 522 . OPENSSL_CMS_OLDMIMETYPE 523 . PKCS7_NOOLDMIMETYPE 524 525- PCNTL: 526 . SIGINFO 527 528- PDO_ODBC 529 . PDO_ODBC_TYPE 530 531- PGSQL: 532 . PGSQL_TRACE_SUPPRESS_TIMESTAMPS 533 . PGSQL_TRACE_REGRESS_MODE 534 . PGSQL_ERRORS_SQLSTATE 535 . PGSQL_SHOW_CONTEXT_NEVER 536 . PGSQL_SHOW_CONTEXT_ERRORS 537 . PGSQL_SHOW_CONTEXT_ALWAYS 538 539- Posix: 540 . POSIX_SC_ARG_MAX 541 . POSIX_SC_PAGESIZE 542 . POSIX_SC_NPROCESSORS_CONF 543 . POSIX_SC_NPROCESSORS_ONLN 544 . POSIX_PC_LINK_MAX 545 . POSIX_PC_MAX_CANON 546 . POSIX_PC_MAX_INPUT 547 . POSIX_PC_NAME_MAX 548 . POSIX_PC_PATH_MAX 549 . POSIX_PC_PIPE_BUF 550 . POSIX_PC_CHOWN_RESTRICTED 551 . POSIX_PC_NO_TRUNC 552 . POSIX_PC_ALLOC_SIZE_MIN 553 . POSIX_PC_SYMLINK_MAX 554 555- Sockets: 556 . SO_ATTACH_REUSEPORT_CBPF (Linux only). 557 . SO_DETACH_BPF (Linux only). 558 . SO_DETACH_FILTER (Linux only). 559 . TCP_QUICKACK (Linux only). 560 . IP_DONTFRAG (FreeBSD only). 561 . IP_MTU_DISCOVER (Linux only). 562 . IP_PMTUDISC_DO (Linux only). 563 . IP_PMTUDISC_DONT (Linux only). 564 . IP_PMTUDISC_WANT (Linux only). 565 . IP_PMTUDISC_PROBE (Linux only). 566 . IP_PMTUDISC_INTERFACE (Linux only). 567 . IP_PMTUDISC_OMIT (Linux only). 568 . AF_DIVERT (FreeBSD only). 569 . SOL_UDPLITE. 570 . UDPLITE_RECV_CSCOV. 571 . UDPLITE_SEND_CSCOV. 572 . SO_RERROR (NetBSD only). 573 . SO_ZEROIZE (OpenBSD only). 574 . SO_SPLICE (OpenBSD only). 575 . TCP_REPAIR (Linux only). 576 . SO_REUSEPORT_LB (FreeBSD only). 577 . IP_BIND_ADDRESS_NO_PORT (Linux only). 578 579- Zip: 580 . ZipArchive::ER_DATA_LENGTH (libzip >= 1.10) 581 . ZipArchive::ER_NOT_ALLOWED (libzip >= 1.10) 582 . ZipArchive::AFL_RDONLY (libzip >= 1.10) 583 . ZipArchive::AFL_IS_TORRENTZIP (libzip >= 1.10) 584 . ZipArchive::AFL_WANT_TORRENTZIP (libzip >= 1.10) 585 . ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10) 586 . ZipArchive::FL_OPEN_FILE_NOW 587 . ZipArchive::LENGTH_TO_END as default value for addFile and replaceFile 588 . ZipArchive::LENGTH_UNCHECKED (libzip >= 1.10.1) 589 590======================================== 59111. Changes to INI File Handling 592======================================== 593 594- assert.* 595 . The assert.* INI settings have been deprecated. 596 This comprises the following INI settings: 597 - assert.active 598 - assert.bail 599 - assert.callback 600 - assert.exception 601 - assert.warning 602 If the value of the setting is equal to the default value, no deprecation 603 notice is emitted. 604 The zend.assertions INI setting should be used instead. 605 606- zend.max_allowed_stack_size 607 . New INI directive to set the maximum allowed stack size. Possible 608 values are `0` (detect the process or thread maximum stack size), `-1` 609 (no limit), or a positive number of bytes. The default is `0`. When it 610 is not possible to detect the the process or thread maximum stack size, 611 a known system default is used. Setting this value too high has the same 612 effect as disabling the stack size limit. Fibers use fiber.stack_size 613 as maximum allowed stack size. An Error is thrown when the process call 614 stack exceeds `zend.max_allowed_stack_size-zend.reserved_stack_size` 615 bytes, to prevent stack-overflow-induced segmentation faults, with 616 the goal of making debugging easier. The stack size increases during 617 uncontrolled recursions involving internal functions or the magic methods 618 __toString, __clone, __sleep, __destruct. This is not related to stack 619 buffer overflows, and is not a security feature. 620 621- zend.reserved_stack_size 622 . New INI directive to set the reserved stack size, in bytes. This is 623 subtracted from the max allowed stack size, as a buffer, when checking the 624 stack size. 625 626======================================== 62712. Windows Support 628======================================== 629 630- Minimum supported Windows version has been bumped to Windows 8 or 631 Windows Server 2012 632 633======================================== 63413. Other Changes 635======================================== 636 637- Core: 638 . An Error is now thrown when the process call stack exceeds a certain size, 639 to prevent stack-overflow-induced segmentation faults, with the goal of 640 making debugging easier. The maximum allowed stack size is controlled 641 by the INI directives zend.max_allowed_stack_size, 642 zend.reserved_stack_size and fiber.stack_size. 643 644- FFI: 645 . FFI::load() is now allowed during preloading when opcache.preload_user is 646 the current system user. Previously, calling FFI::load() was not possible 647 during preloading if the opcache.preload_user directive was set. 648 649- FPM: 650 . FPM CLI test now fails if the socket path is longer than supported by OS. 651 652- Opcache: 653 . In the cli and phpdbg SAPIs, preloading does not require the 654 opcache.preload_user directive to be set anymore when running as root. In 655 other SAPIs, this directive is required when running as root because 656 preloading is done before the SAPI switches to an unprivileged user. 657 658- Streams: 659 . Blocking fread() on socket connection returns immediately if there are 660 any buffered data instead of waiting for more data. 661 . Memory stream no longer fails if seek offset is past the end. Instead 662 the memory is increase on the next write and date between the old end and 663 offset is filled with zero bytes in the same way how it works for files. 664 . stat() access operations like file_exists() and similar will now use real 665 path instead of the actual stream path. This is consistent with stream 666 opening. 667 668======================================== 66914. Performance Improvements 670======================================== 671 672- DOM: 673 . Looping over a DOMNodeList now uses caching. Therefore requesting items no 674 longer takes quadratic time by default. 675 . Getting text content from nodes now avoids an allocation, resulting in a 676 performance gain. 677 . DOMChildNode::remove() now runs in O(1) performance. 678 679- Standard: 680 . The file() flags error check is now about 7% faster. 681 682- SPL: 683 . RecursiveDirectoryIterator now performs less I/O when looping over a 684 directory. 685