xref: /PHP-7.4/UPGRADING (revision b5cb999e)
1a398df3eSKalle Sommer NielsenPHP 7.4 UPGRADE NOTES
277e1a1abSChristopher Jones
377e1a1abSChristopher Jones1. Backward Incompatible Changes
477e1a1abSChristopher Jones2. New Features
5d27b76a7SBob Weinand3. Changes in SAPI modules
6d27b76a7SBob Weinand4. Deprecated Functionality
7d27b76a7SBob Weinand5. Changed Functions
8d27b76a7SBob Weinand6. New Functions
9d27b76a7SBob Weinand7. New Classes and Interfaces
10c97afe21SAnatol Belski8. Removed Extensions and SAPIs
11d27b76a7SBob Weinand9. Other Changes to Extensions
12d27b76a7SBob Weinand10. New Global Constants
13d27b76a7SBob Weinand11. Changes to INI File Handling
14fa6fe06aSAnatol Belski12. Windows Support
15fa6fe06aSAnatol Belski13. Migration to pkg-config
1684e34802SRasmus Lerdorf14. Other Changes
172f6cebb2SIlia Alshanetsky15. Performance Improvements
1884e34802SRasmus Lerdorf
1977e1a1abSChristopher Jones
2084e34802SRasmus Lerdorf========================================
2191f59403SNikita Popov1. Backward Incompatible Changes
22f35f4590SKalle Sommer Nielsen========================================
2371c04324SVictor Csiky
2471c04324SVictor Csiky- Core:
25bca0a7e2SAdam Harvey  . Trying to use values of type null, bool, int, float or resource as an
26d3bc8bebSKalle Sommer Nielsen    array (such as $null["key"]) will now generate a notice. This does not
27688b9136SNikita Popov    affect array accesses performed by list().
28688b9136SNikita Popov    RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
29688b9136SNikita Popov  . get_declared_classes() no longer returns anonymous classes that haven't
30688b9136SNikita Popov    been instantiated yet.
31c8c0bb11SChristoph M. Becker  . "fn" is now a reserved keyword. In particular, it can no longer be used as a
32c8c0bb11SChristoph M. Becker    function or class name. It can still be used as a method or class constant
33c70468b8SNikita Popov    name.
34c70468b8SNikita Popov  . Passing the result of a (non-reference) list() assignment by reference is
35c70468b8SNikita Popov    consistently disallowed now. Previously this worked if the right-hand side
36c70468b8SNikita Popov    was a simple (CV) variable and did not occur as part of the list().
37c70468b8SNikita Popov  . `<?php` at the end of the file (without trailing newline) will now be
38c70468b8SNikita Popov    interpreted as an opening PHP tag. Previously it was interpreted either as
39c70468b8SNikita Popov    `<? php` and resulted in a syntax error (with short_open_tag=1) or was
40c70468b8SNikita Popov    interpreted as a literal `<?php` string (with short_open_tag=0).
41c70468b8SNikita Popov  . When using include/require on a stream, stream_set_option() will be invoked
42c70468b8SNikita Popov    with the STREAM_OPTION_READ_BUFFER option. Custom stream wrapper
43c70468b8SNikita Popov    implementations may need to implement the stream_set_option() method to
44c70468b8SNikita Popov    avoid a warning (always returning false is a sufficient implementation).
45c70468b8SNikita Popov  . The "creating default object from empty value" warning is now consistently
46c70468b8SNikita Popov    thrown if a falsy value is promoted into an stdClass object. Previously some
4704e3523bSNikita Popov    cases like `$null->prop[0] = $val` missed this warning.
4804e3523bSNikita Popov  . Previously get_declared_classes() always returned parent classes before
4904e3523bSNikita Popov    child classes. This is no longer the case. No particular order is guaranteed
5004e3523bSNikita Popov    for the get_declared_classes() return value.
5104e3523bSNikita Popov
5204e3523bSNikita Popov- BCMath:
5304e3523bSNikita Popov  . BCMath functions will now warn if a non well-formed number is passed, such
5404e3523bSNikita Popov    as "32foo". The argument will be interpreted as zero (as before).
5504e3523bSNikita Popov
569b335c56SChristoph M. Becker- Curl:
5704e3523bSNikita Popov  . Attempting to serialize a CURLFile class will now generate an exception.
5804e3523bSNikita Popov    Previously the exception was only thrown on unserialization.
5904e3523bSNikita Popov  . Using CURLPIPE_HTTP1 is deprecated, and is no longer supported as of cURL
6030156d58SRudi Theunissen    7.62.0.
61a3117998SSebastian Bergmann  . The $version parameter of curl_version() is deprecated. If any value not
6230156d58SRudi Theunissen    equal to the default CURLVERSION_NOW is passed, a warning is raised and the
6330156d58SRudi Theunissen    parameter is ignored.
6430156d58SRudi Theunissen
6530156d58SRudi Theunissen- Date:
662543e61aSNikita Popov  . Calling var_dump() or similar on a DateTime(Immutable) instance will no
672543e61aSNikita Popov    longer leave behind accessible properties on the object.
682543e61aSNikita Popov  . Comparison of DateInterval objects (using ==, < and so on) will now generate
692543e61aSNikita Popov    a warning and always return false. Previously all DateInterval objects were
702543e61aSNikita Popov    considered equal, unless they had properties.
712543e61aSNikita Popov
722543e61aSNikita PopovDOM:
732543e61aSNikita Popov  . As of PHP 7.4.4, the value of the $childNodes property of DOMDocument,
742543e61aSNikita Popov    DOMNode, DOMProcessingInstruction, DOMComment, DOMText, DOMCdataSection and
752543e61aSNikita Popov    DOMNotation is now an empty DOMNodeList instead of NULL, according to the
762543e61aSNikita Popov    W3C and WHATWG standards and the PHP manual.
772543e61aSNikita Popov
782543e61aSNikita Popov- Intl:
792543e61aSNikita Popov  . The default parameter value of idn_to_ascii() and idn_to_utf8() is now
802543e61aSNikita Popov    INTL_IDNA_VARIANT_UTS46 instead of the deprecated INTL_IDNA_VARIANT_2003.
812543e61aSNikita Popov
822543e61aSNikita Popov- MySQLi:
83490a49d0SNikita Popov  . The embedded server functionality has been removed. It was broken since
84490a49d0SNikita Popov    at least PHP 7.0.
85490a49d0SNikita Popov  . The undocumented mysqli::$stat property has been removed in favor of
86490a49d0SNikita Popov    mysqli::stat().
87490a49d0SNikita Popov
88490a49d0SNikita Popov- Openssl:
89490a49d0SNikita Popov  . The openssl_random_pseudo_bytes() function will now throw an exception in
90490a49d0SNikita Popov    error situations, similar to random_bytes(). In particular, an Error is
91490a49d0SNikita Popov    thrown if the number of requested bytes is less than *or equal to* zero,
92490a49d0SNikita Popov    and an Exception is thrown if sufficient randomness cannot be gathered.
93490a49d0SNikita Popov    The $crypto_strong output argument is guaranteed to always be true if the
94490a49d0SNikita Popov    function does not throw, so explicitly checking it is not necessary.
95f35f4590SKalle Sommer Nielsen    RFC: http://php.net/manual/de/function.openssl-random-pseudo-bytes.php
963a8f2606SDmitry Stogov
973a8f2606SDmitry Stogov- Pcntl:
983a8f2606SDmitry Stogov  . The $restart_syscalls flag for pcntl_signal() will now be respected for
993a8f2606SDmitry Stogov    SIGALARM. Previously it was hardcoded to false. To reduce the backwards
1003a8f2606SDmitry Stogov    compatibility impact, the default for SIGALARM will remain false however.
1013a8f2606SDmitry Stogov
1023a8f2606SDmitry Stogov- PCRE:
1033a8f2606SDmitry Stogov  . When PREG_UNMATCHED_AS_NULL mode is used, trailing unmatched capturing
1043a8f2606SDmitry Stogov    groups will now also be set to null (or [null, -1] if offset capture is
1053a8f2606SDmitry Stogov    enabled). This means that the size of the $matches will always be the same.
1063a8f2606SDmitry Stogov
1073a8f2606SDmitry Stogov- PEAR:
1083a8f2606SDmitry Stogov  . Installation of PEAR (including PECL) is no longer enabled by default. It
10918adc6f0SChristoph M. Becker    can be explicitly enabled using --with-pear. This option is deprecated and
11018adc6f0SChristoph M. Becker    may be removed in the future.
111b2b2b437SNikita Popov
11297bfc283SChristoph M. Becker- PDO:
11397bfc283SChristoph M. Becker  . Attempting to serialize a PDO or PDOStatement instance will now generate
11418adc6f0SChristoph M. Becker    an Exception rather than a PDOException, consistent with other internal
11549762c84SChristoph M. Becker    classes which do not support serialization.
11649762c84SChristoph M. Becker
11749762c84SChristoph M. Becker- Reflection:
11849762c84SChristoph M. Becker  . Reflection objects will now generate an exception if an attempt is made
11949762c84SChristoph M. Becker    to serialize them. Serialization for reflection objects was never
12049762c84SChristoph M. Becker    supported and resulted in corrupted reflection objects. It has been
12163973d1bSStanislav Malyshev    explicitly prohibited now.
12263973d1bSStanislav Malyshev  . The signature of the ReflectionMethod::getClosure() method changed to
12363973d1bSStanislav Malyshev    account for existing behavior with static methods:
12463973d1bSStanislav Malyshev        Before: ReflectionMethod::getClosure($object)
12563973d1bSStanislav Malyshev        After: ReflectionMethod::getClosure($object = null)
12663973d1bSStanislav Malyshev    The new signature is also (LSP) compatible with older PHP versions.
12741a6625cSNikita Popov
12841a6625cSNikita Popov- SAPI:
12941a6625cSNikita Popov  . Starting with 7.4.11, incoming cookie names are not url-decoded. This was never
13041a6625cSNikita Popov    required by the standard, outgoing cookie names aren't encoded and this leads
13141a6625cSNikita Popov    to security issues (CVE-2020-7070).
13241a6625cSNikita Popov
13371c04324SVictor Csiky- SPL:
13471c04324SVictor Csiky  . Calling get_object_vars() on an ArrayObject instance will now always return
13571c04324SVictor Csiky    the properties of the ArrayObject itself (or a subclass). Previously it
13671c04324SVictor Csiky    returned the values of the wrapped array/object unless the STD_PROP_LIST
13771c04324SVictor Csiky    flag was specified. Other affected operations are:
13871c04324SVictor Csiky
13971c04324SVictor Csiky     * ReflectionObject::getProperties()
14071c04324SVictor Csiky     * reset(), current(), etc. Use Iterator methods instead.
14171c04324SVictor Csiky     * Potentially others working on object properties as a list.
14271c04324SVictor Csiky     * Other internal functions that iterate over an array, but which
14371c04324SVictor Csiky       previously silently accepted an ArrayObject as well; eg curl_setopt()
14471c04324SVictor Csiky       when used with an option that expects an array.
14571c04324SVictor Csiky
14671c04324SVictor Csiky    (array) casts are *not* affected. They will continue to return either the
14771c04324SVictor Csiky    wrapped array, or the ArrayObject properties, depending on whether the
14871c04324SVictor Csiky    STD_PROP_LIST flag is used.
14971c04324SVictor Csiky  . SplPriorityQueue::setExtractFlags() will throw an exception if zero is
150c8c0bb11SChristoph M. Becker    passed. Previously this would generate a recoverable fatal error on the
151cc98b880SNikita Popov    next extraction operation.
152c8c0bb11SChristoph M. Becker  . ArrayObject, ArrayIterator, SplDoublyLinkedList and SplObjectStorage now
153c8c0bb11SChristoph M. Becker    support the __serialize() + __unserialize() mechanism in addition to the
154311922ddSStanislav Malyshev    Serializable interface. This means that serialization payloads created on
155*b5cb999eSChristoph M. Becker    older PHP versions can still be unserialized, but new payloads created by
156311922ddSStanislav Malyshev    PHP 7.4 will not be understood by older versions.
157311922ddSStanislav Malyshev
158311922ddSStanislav Malyshev- Standard:
1599cdd547eSNikita Popov  . The "o" serialization format has been removed. As it is never produced by
1609cdd547eSNikita Popov    PHP, this may only break unserialization of manually crafted strings.
1619cdd547eSNikita Popov  . Password hashing algorithm identifiers are now nullable strings rather
1629cdd547eSNikita Popov    than integers.
1639cdd547eSNikita Popov
164b2b2b437SNikita Popov     * PASSWORD_DEFAULT was int 1; now is null in PHP <7.4.3 and string '2y' afterwards
165b2b2b437SNikita Popov     * PASSWORD_BCRYPT was int 1; now is string '2y'
166b2b2b437SNikita Popov     * PASSWORD_ARGON2I was int 2; now is string 'argon2i'
167b2b2b437SNikita Popov     * PASSWORD_ARGON2ID was int 3; now is string 'argon2id'
168b2b2b437SNikita Popov
1699221bd7fSChristoph M. Becker    Applications correctly using the constants PASSWORD_DEFAULT,
170fc775f69SGabriel Caruso    PASSWORD_BCRYPT, PASSWORD_ARGON2I, and PASSWORD_ARGON2ID will continue to
1719221bd7fSChristoph M. Becker    function correctly.
17295013042Sseliver  . htmlentities() will now throw a notice (instead of a strict standards
17395013042Sseliver    warning) if it is used with an encoding for which only basic entity
17495013042Sseliver    substitution is supported, in which case it is equivalent to
17595013042Sseliver    htmlspecialchars().
1769221bd7fSChristoph M. Becker  . fread() and fwrite() will now return false if the operation failed.
17777e1a1abSChristopher Jones    Previously an empty string or 0 was returned. EAGAIN/EWOULDBLOCK are not
17877e1a1abSChristopher Jones    considered failures.
17977e1a1abSChristopher Jones  . fread() and fwrite() on plain files will now throw a notice on failure,
1802c2eaa08SSteph Fox    such as when trying to write to a read-only file resource.
1816d4de4cfSDavid Walker  . The stream_read() and stream_write() methods on stream wrappers now
18248873572SThomas Punt    interpret "false" as a failure return values. If no data is available, but
18348873572SThomas Punt    no error occurred, an empty string should be returned instead.
18448873572SThomas Punt  . round(-0.0) will now return -0.0 rather than +0.0.
18548873572SThomas Punt
18648873572SThomas Punt- Tokenizer:
1876d4de4cfSDavid Walker  . token_get_all() will now emit a T_BAD_CHARACTER token for unexpected
1886d4de4cfSDavid Walker    characters instead of leaving behind holes in the token stream.
1896d4de4cfSDavid Walker
1901cb3c150SJonathan Torres========================================
1911cb3c150SJonathan Torres2. New Features
192d04917c7SNikita Popov========================================
193d04917c7SNikita Popov
194d04917c7SNikita Popov- Core:
195d04917c7SNikita Popov  . Added support for typed properties. For example:
196d04917c7SNikita Popov
197d4053ceeSChristoph M. Becker        class User {
198d4053ceeSChristoph M. Becker            public int $id;
1996d4de4cfSDavid Walker            public string $name;
2001738fa3eSChristoph M. Becker        }
2011738fa3eSChristoph M. Becker
2021738fa3eSChristoph M. Becker    This will enforce that $user->id can only be assigned integers and
20395c9d9d2SNikita Popov    $user->name can only be assigned strings. For more information see the
20495c9d9d2SNikita Popov    RFC: https://wiki.php.net/rfc/typed_properties_v2
20595c9d9d2SNikita Popov
20695c9d9d2SNikita Popov  . Added support for arrow functions with implicit by-value scope binding.
20795c9d9d2SNikita Popov    For example:
20895c9d9d2SNikita Popov
20995c9d9d2SNikita Popov        $factor = 10;
21095c9d9d2SNikita Popov        $nums = array_map(fn($num) => $num * $factor, $nums);
21195c9d9d2SNikita Popov
21295c9d9d2SNikita Popov    RFC: https://wiki.php.net/rfc/arrow_functions_v2
21395c9d9d2SNikita Popov
21495c9d9d2SNikita Popov  . Added support for limited return type covariance and argument type
21595c9d9d2SNikita Popov    contravariance. The following code will now work:
216cc98b880SNikita Popov
21795c9d9d2SNikita Popov        class A {}
21895c9d9d2SNikita Popov        class B extends A {}
21995c9d9d2SNikita Popov
22095c9d9d2SNikita Popov        class Producer {
22195c9d9d2SNikita Popov            public function method(): A {}
22295c9d9d2SNikita Popov        }
22395c9d9d2SNikita Popov        class ChildProducer extends Producer {
22495c9d9d2SNikita Popov            public function method(): B {}
22595c9d9d2SNikita Popov        }
22695c9d9d2SNikita Popov
22795c9d9d2SNikita Popov    Full variance support is only available if autoloading is used. Inside a
22895c9d9d2SNikita Popov    single file only non-cyclic type references are possible, because all
22995c9d9d2SNikita Popov    classes need to be available before they are referenced.
23095c9d9d2SNikita Popov    RFC: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
231f2be6e73SNikita Popov
23295c9d9d2SNikita Popov  . Added support for coalesce assign (??=) operator. For example:
23395c9d9d2SNikita Popov
23495c9d9d2SNikita Popov        $array['key'] ??= computeDefault();
23541a6625cSNikita Popov        // is roughly equivalent to
23641a6625cSNikita Popov        if (!isset($array['key'])) {
23741a6625cSNikita Popov            $array['key'] = computeDefault();
23841a6625cSNikita Popov        }
23941a6625cSNikita Popov
24041a6625cSNikita Popov    RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator
24141a6625cSNikita Popov
24241a6625cSNikita Popov  . Added support for unpacking inside arrays. For example:
24341a6625cSNikita Popov
24441a6625cSNikita Popov        $arr1 = [3, 4];
24541a6625cSNikita Popov        $arr2 = [1, 2, ...$arr1, 5];
24641a6625cSNikita Popov        // $arr2 == [1, 2, 3, 4, 5]
24741a6625cSNikita Popov
24841a6625cSNikita Popov    RFC: https://wiki.php.net/rfc/spread_operator_for_array
24941a6625cSNikita Popov
25095c9d9d2SNikita Popov  . Added support for underscore separators in numeric literals. Some examples:
251033907b9STim Bazuin
252033907b9STim Bazuin        6.674_083e-11; // float
253033907b9STim Bazuin        299_792_458;   // decimal
254033907b9STim Bazuin        0xCAFE_F00D;   // hexadecimal
255033907b9STim Bazuin        0b0101_1111;   // binary
25655277a66SCharles R. Portwood II
2573362620bSPeter Kokot    RFC: https://wiki.php.net/rfc/numeric_literal_separator
2583362620bSPeter Kokot
25955277a66SCharles R. Portwood II  . Support for WeakReferences has been added.
26055277a66SCharles R. Portwood II    RFC: https://wiki.php.net/rfc/weakrefs
26155277a66SCharles R. Portwood II
26255277a66SCharles R. Portwood II  . Throwing exceptions from __toString() is now permitted. Previously this
2633362620bSPeter Kokot    resulted in a fatal error. Existing recoverable fatals in string conversions
26455277a66SCharles R. Portwood II    have been converted to Error exceptions.
265cb00ca7cSCôme Chilliet    RFC: https://wiki.php.net/rfc/tostring_exceptions
266cb00ca7cSCôme Chilliet
267cb00ca7cSCôme Chilliet- CURL:
268cb00ca7cSCôme Chilliet  . CURLFile now supports stream wrappers in addition to plain file names, if
26977e1a1abSChristopher Jones    the extension has been built against libcurl >= 7.56.0.  The streams may
270d27b76a7SBob Weinand    need to be seekable.
27177e1a1abSChristopher Jones
2722c2eaa08SSteph Fox- Filter:
273d169d06dSChristoph M. Becker  . The FILTER_VALIDATE_FLOAT filter now supports the min_range and max_range
274d169d06dSChristoph M. Becker    options, with the same semantics as FILTER_VALIDATE_INT.
275d169d06dSChristoph M. Becker
276d169d06dSChristoph M. Becker- FFI:
277587ab006SRemi Collet  . A new extension which provides a simple way to call native functions, access
2786493d548SJakub Zelenka    native variables and create/access data structures defined in C libraries.
2796493d548SJakub Zelenka    RFC: https://wiki.php.net/rfc/ffi
2806493d548SJakub Zelenka
2816493d548SJakub Zelenka- GD:
2826493d548SJakub Zelenka  . Added the "scatter" image filter (IMG_FILTER_SCATTER) to apply a scatter
2836493d548SJakub Zelenka    filter to images. This filter has the following prototype:
2846493d548SJakub Zelenka
2856493d548SJakub Zelenka        imagefilter($im, IMG_FILTER_SCATTER, int $sub, int $plus, array $colors = []);
28672231ed7SSebastian Bergmann
287e546d721SSergei Turchanov    The $colors array can be populated with a set of indexed colors to
288e546d721SSergei Turchanov    apply the scatter pixel shifting on.
289e546d721SSergei Turchanov
290e546d721SSergei Turchanov    Note, the result of this filter is always random.
291587ab006SRemi Collet
29277e1a1abSChristopher Jones- Hash:
293d27b76a7SBob Weinand  . Added "crc32c" hash using Castagnoli's polynomial. This crc32 variant is
29477e1a1abSChristopher Jones    used by storage systems, such as iSCSI, SCTP, Btrfs and ext4.
2952c2eaa08SSteph Fox
2963588d8afSNikita Popov- Mbstring:
2974a528d46SNikita Popov  . Added mb_str_split() function, which provides the same functionality as
2983588d8afSNikita Popov    str_split(), but operating on code points rather than bytes.
2993588d8afSNikita Popov    RFC: https://wiki.php.net/rfc/mb_str_split
3003588d8afSNikita Popov  . Added mbstring.regex_retry_limit ini setting defaulting to 1000000. It
3013588d8afSNikita Popov    limits the amount of backtracking that may be performed during one mbregex
3024a528d46SNikita Popov    match and thus protects against exponential backtracking attacks (ReDOS).
3034a528d46SNikita Popov    This setting only takes effect when linking against oniguruma >= 6.8.0.
3044a528d46SNikita Popov
3054a528d46SNikita Popov- OPcache:
3063588d8afSNikita Popov  . Support for preloading code has been added.
30779a27ccfSChristoph M. Becker    RFC: https://wiki.php.net/rfc/preload
30879a27ccfSChristoph M. Becker
30979a27ccfSChristoph M. Becker- PCRE:
31079a27ccfSChristoph M. Becker  . The preg_replace_callback() and preg_replace_callback_array() functions now
31179a27ccfSChristoph M. Becker    accept an additional $flags argument, with support for the
3123cbf594dSChristoph M. Becker    PREG_OFFSET_CAPTURE and PREG_UNMATCHED_AS_NULL flags. This influences the
3133cbf594dSChristoph M. Becker    format of the matches array passed to the callback function.
3143cbf594dSChristoph M. Becker
315e147eb24SAnatol Belski- PDO:
3164a528d46SNikita Popov  . The username and password can now be specified as part of the PDO DSN for
3174a528d46SNikita Popov    the mysql, mssql, sybase, dblib, firebird and oci drivers. Previously this
3184a528d46SNikita Popov    was only supported by the pgsql driver. If a username/password is specified
3194a528d46SNikita Popov    both in the constructor and the DSN, the constructor takes precedence.
3204a528d46SNikita Popov
3214a528d46SNikita Popov        new PDO("mysql:host=xxx;port=xxx;dbname=xxx;user=xxx;password=xxx");
3224a528d46SNikita Popov
3234a528d46SNikita Popov- PDO_OCI:
3244a528d46SNikita Popov  . PDOStatement::getColumnMeta() is now available
3254a528d46SNikita Popov
3264a528d46SNikita Popov- PDO_SQLite:
3274a528d46SNikita Popov  . PDOStatement::getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT) allows
3284a528d46SNikita Popov    checking whether the statement is read-only, i.e. if it doesn't modify
3294a528d46SNikita Popov    the database.
3304a528d46SNikita Popov  . PDO::setAttribute(PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES, true) enables the
3314a528d46SNikita Popov    use of SQLite3 extended result codes in errorInfo().
3324a528d46SNikita Popov
3334a528d46SNikita Popov- SQLite3:
3344a528d46SNikita Popov  . Added SQLite3::lastExtendedErrorCode() to fetch the last extended result
3354a528d46SNikita Popov    code.
3364a528d46SNikita Popov  . Added SQLite3::enableExtendedResultCodes($enable = true), which will make
3374a528d46SNikita Popov    SQLite3::lastErrorCode() return extended result codes.
3384a528d46SNikita Popov
3394a528d46SNikita Popov- Standard:
3404a528d46SNikita Popov  . strip_tags() now also accepts an array of allowed tags: Instead of
3414a528d46SNikita Popov    strip_tags($str, '<a><p>') you can now write strip_tags($str, ['a', 'p']).
3424a528d46SNikita Popov
3434a528d46SNikita Popov  . A new mechanism for custom object serialization has been added, which
3444a528d46SNikita Popov    uses two new magic methods:
34543329e85SChristoph M. Becker
3464a528d46SNikita Popov        // Returns array containing all the necessary state of the object.
3474a528d46SNikita Popov        public function __serialize(): array;
3484a528d46SNikita Popov
3494a528d46SNikita Popov        // Restores the object state from the given data array.
3504a528d46SNikita Popov        public function __unserialize(array $data): void;
3514a528d46SNikita Popov
3524a528d46SNikita Popov    The new serialization mechanism supersedes the Serializable interface,
3534a528d46SNikita Popov    which will be deprecated in the future.
3544a528d46SNikita Popov
3554a528d46SNikita Popov    RFC: https://wiki.php.net/rfc/custom_object_serialization
3564a528d46SNikita Popov
357e147eb24SAnatol Belski  . A new 'max_depth' option for unserialize(), as well as an
35877e1a1abSChristopher Jones    unserialize_max_depth ini setting have been added. These control the
359d27b76a7SBob Weinand    maximum depth of structures permitted during unserialization, and are
36077e1a1abSChristopher Jones    intended to prevent stack overflows. The default depth limit is 4096 and
3610fa42424SHannes Magnusson    can be disabled by setting unserialize_max_depth=0.
362e8237705SAndrea Faulds
363e8237705SAndrea Faulds  . array_merge() and array_merge_recursive() may now be called without any
364e8237705SAndrea Faulds    arguments, in which case they will return an empty array. This is useful
365e8237705SAndrea Faulds    in conjunction with the spread operator, e.g. array_merge(...$arrays).
366e8237705SAndrea Faulds
367e8237705SAndrea Faulds  . proc_open() now accepts an array instead of a string for the command. In
368e8237705SAndrea Faulds    this case the process will be opened directly (without going through a
369e8237705SAndrea Faulds    shell) and PHP will take care of any necessary argument escaping.
370974abd8bSChristoph M. Becker
371974abd8bSChristoph M. Becker        proc_open(['php', '-r', 'echo "Hello World\n";'], $descriptors, $pipes);
372974abd8bSChristoph M. Becker
373974abd8bSChristoph M. Becker  . proc_open() now supports "redirect" and "null" descriptors. For example:
374974abd8bSChristoph M. Becker
375974abd8bSChristoph M. Becker        // Like 2>&1 on the shell
376974abd8bSChristoph M. Becker        proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['redirect', 1]], $pipes);
377974abd8bSChristoph M. Becker        // Like 2>/dev/null or 2>nul on the shell
378e8237705SAndrea Faulds        proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['null']], $pipes);
379cb9d81efSDmitry Stogov
380cb9d81efSDmitry Stogov  . password_hash() has argon2i(d) implementations from ext/sodium when PHP is
381f7f48643Stimurib    built without libargon.
383974abd8bSChristoph M. Becker    RFC: https://wiki.php.net/rfc/sodium.argon.hash
384974abd8bSChristoph M. Becker
385974abd8bSChristoph M. Becker========================================
386bf5cf794SChristoph M. Becker3. Changes in SAPI modules
387cb9d81efSDmitry Stogov========================================
38843d9f599SNikita Popov
38943d9f599SNikita Popov========================================
39043d9f599SNikita Popov4. Deprecated Functionality
391cb00ca7cSCôme Chilliet========================================
392cb00ca7cSCôme Chilliet
393cb00ca7cSCôme Chilliet- Core:
394cb00ca7cSCôme Chilliet  . Nesting ternary operators without explicit parentheses is deprecated:
395cb00ca7cSCôme Chilliet
396cb00ca7cSCôme Chilliet        // Code like
397cb00ca7cSCôme Chilliet        $a ? $b : $c ? $d : $e
398cb00ca7cSCôme Chilliet        // should be replaced by (current interpretation)
399cb00ca7cSCôme Chilliet        ($a ? $b : $c) ? $d : $e
400cb00ca7cSCôme Chilliet        // or (likely intended interpretation)
40177e1a1abSChristopher Jones        $a ? $b : ($c ? $d : $e)
402d27b76a7SBob Weinand
40377e1a1abSChristopher Jones    RFC: https://wiki.php.net/rfc/ternary_associativity
40432dcbd10SDaniel Lowrey  . The array and string offset access syntax using curly braces is deprecated.
40583497327SAnatol Belski    Use $str[$idx] instead of $str{$idx}.
40683497327SAnatol Belski    RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
40783497327SAnatol Belski  . The (real) cast is deprecated, use (float) instead.
40883497327SAnatol Belski  . Unbinding $this of a non-static method through a combination of
40983497327SAnatol Belski    ReflectionMethod::getClosure() and closure rebinding is deprecated. Doing
41083497327SAnatol Belski    so is equivalent to calling a non-static method statically, which has been
41183497327SAnatol Belski    deprecated since PHP 7.0.
41283497327SAnatol Belski  . Unbinding $this of a non-static closure that uses $this is deprecated.
41383497327SAnatol Belski  . Using "parent" inside a class without a parent is deprecated, and will throw
41445db77edSAnatol Belski    a compile-time error in the future. Currently an error will only be
4159b335c56SChristoph M. Becker    generated if/when the parent is accessed at run-time.
4169b335c56SChristoph M. Becker  . The allow_url_include ini directive is deprecated. Enabling it will generate
417c0228f74SChristoph M. Becker    a deprecation notice at startup.
418c0228f74SChristoph M. Becker
41983497327SAnatol Belski- COM:
420d9d13abaSMichael Moravec  . Importing type libraries with case-insensitive constant registering has been
421d9d13abaSMichael Moravec    deprecated.
422d9d13abaSMichael Moravec
423d9d13abaSMichael Moravec- Filter:
4242a78006aSJakub Zelenka  . FILTER_SANITIZE_MAGIC_QUOTES is deprecated, use FILTER_SANITIZE_ADD_SLASHES
4252a78006aSJakub Zelenka    instead.
4262a78006aSJakub Zelenka
4277fea7967SNikita Popov- Mbstring:
4287fea7967SNikita Popov  . Passing a non-string pattern to mb_ereg_replace() is deprecated. Currently
429a1d36a11SNikita Popov    non-string patterns are interpreted as ASCII codepoints. In PHP 8 the
43010a336d3SNikita Popov    pattern will be interpreted as a string instead.
431fc80114aSNikita Popov  . Passing the encoding as 3rd parameter to mb_strrpos() is deprecated. Instead
4327fea7967SNikita Popov    pass a 0 offset and encoding as 4th parameter.
433b66eeb36SAnatol Belski
434b66eeb36SAnatol Belski- LDAP:
435b66eeb36SAnatol Belski  . ldap_control_paged_result_response and ldap_control_paged_result are
436b66eeb36SAnatol Belski    deprecated. Pagination controls can be sent along with ldap_search instead.
437b66eeb36SAnatol Belski
438b66eeb36SAnatol Belski- Reflection:
439b66eeb36SAnatol Belski  . Calls to ReflectionType::__toString() now generate a deprecation notice.
440b66eeb36SAnatol Belski    This method has been deprecated in favor of ReflectionNamedType::getName()
441b66eeb36SAnatol Belski    in the documentation since PHP 7.1, but did not throw a deprecation notice
442b66eeb36SAnatol Belski    for technical reasons.
443b66eeb36SAnatol Belski  . The export() methods on all Reflection classes are deprecated. Construct a
444b66eeb36SAnatol Belski    Reflection object and convert it to string instead:
445aca0f7e2SPaul Crovella
446aca0f7e2SPaul Crovella        // ReflectionClass::export(Foo::class, false) is:
447b66eeb36SAnatol Belski        echo new ReflectionClass(Foo::class), "\n";
4489b335c56SChristoph M. Becker        // $str = ReflectionClass::export(Foo::class, true) is:
4499b335c56SChristoph M. Becker        $str = (string) new ReflectionClass(Foo::class);
4509b335c56SChristoph M. Becker
4519b335c56SChristoph M. Becker- Socket:
4521f474272SJakub Zelenka  . The AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES flags for
4531f474272SJakub Zelenka    socket_addrinfo_lookup() are deprecated, due to an upstream deprecation in
4541f474272SJakub Zelenka    glibc.
4551f474272SJakub Zelenka
456e788708eSAnatol Belski- Standard:
457e788708eSAnatol Belski  . Passing invalid characters to ''base_convert()'', ''bindec()'', ''octdec()''
458e788708eSAnatol Belski    and ''hexdec()'' will now generate a deprecation notice. The result will
459e788708eSAnatol Belski    still be computed as if the invalid characters did not exist. Leading and
460e788708eSAnatol Belski    trailing whitespace, as well as prefixes of type 0x (depending on base)
461e788708eSAnatol Belski    continue to be allowed.
462e788708eSAnatol Belski  . Using array_key_exists() on objects is deprecated. Instead either isset()
463e788708eSAnatol Belski    or property_exists() should be used.
464e788708eSAnatol Belski  . The is_real() function is deprecated, use is_float() instead.
465e788708eSAnatol Belski  . The get_magic_quotes_gpc() and get_magic_quotes_runtime() functions are
466e788708eSAnatol Belski    deprecated. They always return false.
467e788708eSAnatol Belski  . The hebrevc() function is deprecated. It can be replaced with
468e788708eSAnatol Belski    nl2br(hebrev($str)), or preferably the use of Unicode RTL support.
469e788708eSAnatol Belski  . The convert_cyr_string() function is deprecated. It can be replaced by one
470e788708eSAnatol Belski    of mb_convert_string(), iconv() or UConverter.
471d0ee2a82SGabriel Caruso  . The money_format() function is deprecated. It can be replaced by the
472d0ee2a82SGabriel Caruso    intl NumberFormatter functionality.
473d0ee2a82SGabriel Caruso  . The ezmlm_hash() function is deprecated.
474d0ee2a82SGabriel Caruso  . The restore_include_path() function is deprecated. It can be replaced by
47550516a6eSEnno Woortmann    ini_restore('include_path').
47650516a6eSEnno Woortmann  . Passing parameters to implode() in reverse order is deprecated, use
47750516a6eSEnno Woortmann    implode($glue, $parts) instead of implode($parts, $glue).
47888e94a0bSTyson Andre
479cb00ca7cSCôme Chilliet========================================
480cb00ca7cSCôme Chilliet5. Changed Functions
481cb00ca7cSCôme Chilliet========================================
482cb00ca7cSCôme Chilliet
483cb00ca7cSCôme Chilliet- SPL:
484cb00ca7cSCôme Chilliet  . SplFileObject::fputcsv(), ::fgetcsv() and ::setCsvControl() now accept an
485cb00ca7cSCôme Chilliet    empty string as $escape argument, which disables the proprietary PHP
48677e1a1abSChristopher Jones    escaping mechanism. SplFileObject::getCsvControl() now may also return an
487d27b76a7SBob Weinand    empty string for the third array element, accordingly.
48877e1a1abSChristopher Jones
4892c2eaa08SSteph Fox- Standard:
490e8237705SAndrea Faulds  . fputcsv() and fgetcsv() now accept an empty string as $escape argument,
491e8237705SAndrea Faulds    which disables the proprietary PHP escaping mechanism. The behavior of
492e8237705SAndrea Faulds    str_getcsv() has been adjusted accordingly (formerly, an empty string was
49377e1a1abSChristopher Jones    identical to using the default).
494c97afe21SAnatol Belski  . proc_open() on Windows can be passed a "create_process_group" option. It
49577e1a1abSChristopher Jones    is required, if the child process is supposed to handle CTRL events.
4962c2eaa08SSteph Fox  . password_hash() now accepts nullable string and int as $algo argument.
49777e1a1abSChristopher Jones  . password_needs_rehash() now accepts nullable string and int as $algo
498d27b76a7SBob Weinand    argument.
49977e1a1abSChristopher Jones
500f6af81d5SChristoph M. Becker========================================
501161fd757SNikita Popov6. New Functions
50247699a24SNikita Popov========================================
503161fd757SNikita Popov
504c05a069aSChristoph M. Becker- Core:
505c05a069aSChristoph M. Becker  . Added get_mangled_object_vars($object) function, which returns the mangled
506c05a069aSChristoph M. Becker    object properties. It returns the same result as (array) $object, with the
507c05a069aSChristoph M. Becker    exception that it ignores overloaded array casts, such as used by
508c05a069aSChristoph M. Becker    ArrayObject.
509c05a069aSChristoph M. Becker
510aed1e358SChristoph M. Becker- GD:
511aed1e358SChristoph M. Becker  . Added imagecreatefromtga() function, which allows reading images in TGA
512aed1e358SChristoph M. Becker    format. TGA support is now also indicated by gd_info() and imagetypes().
513aed1e358SChristoph M. Becker    Note that TGA images are not recognized by imagecreatefromstring() and
5143362620bSPeter Kokot    getimagesize().
5153362620bSPeter Kokot
5169b335c56SChristoph M. Becker- OpenSSL:
517aed1e358SChristoph M. Becker  . Added openssl_x509_verify(mixed cert, mixed key) function that verifies the
51800cd6712SAndreas Treichel    signature of the certificate using a public key. A wrapper around the
51900cd6712SAndreas Treichel    OpenSSL's X509_verify() function.
52000cd6712SAndreas Treichel    See <https://github.com/php/php-src/pull/3624>.
52139301abbSAnatol Belski
52239301abbSAnatol Belski- Pcntl:
52339301abbSAnatol Belski  . Added bool pcntl_unshare(int flags) function which allows dissociating
52439301abbSAnatol Belski    parts of the process execution context which are currently being shared with
52539301abbSAnatol Belski    other processes. Explicitly, it allows you to unshare the mount, IPC, UTS,
526a9ab5d47SChristoph M. Becker    network, PID, user and cgroup namespaces.
527a9ab5d47SChristoph M. Becker
528a9ab5d47SChristoph M. Becker- SQLite3:
52971c04324SVictor Csiky  . Added SQLite3Stmt::getSQL() to retrieve the SQL of the statement. If true is
530398be731SKalle Sommer Nielsen    passed as $expanded argument, query parameters will be replaced in the
531a398df3eSKalle Sommer Nielsen    return value by their currently bound value, if libsqlite ≥ 3.14 is used.
5327b8b2e50SRasmus Lerdorf  . Added SQLite3::backup() to create database backups via the SQLite3 online
533eca3b962SChristoph M. Becker    backup API.
534eca3b962SChristoph M. Becker
535eca3b962SChristoph M. Becker- Standard
536eca3b962SChristoph M. Becker  . bool sapi_windows_set_ctrl_handler(callable handler, [, bool add = true]) -
537eca3b962SChristoph M. Becker    set or remove a handler function upon receiving a CTRL event. The handler
5389b335c56SChristoph M. Becker    function is expected to have this signature: "function handler(int $event)".
5393f241f3cSChristoph M. Becker  . bool sapi_windows_generate_ctrl_event(int type, int pid) - send a CTRL event
540e345af1aSChristoph M. Becker    to another process.
541e345af1aSChristoph M. Becker  . array password_algos() - return a complete list of all registered password
5423f241f3cSChristoph M. Becker    hashing algorithms. For more details see the RFC:
5433f241f3cSChristoph M. Becker    https://wiki.php.net/rfc/password_registry
5449b335c56SChristoph M. Becker
5459b335c56SChristoph M. Becker========================================
5469b335c56SChristoph M. Becker7. New Classes and Interfaces
5479b335c56SChristoph M. Becker========================================
5489b335c56SChristoph M. Becker
5499b335c56SChristoph M. Becker- Reflection:
5509b335c56SChristoph M. Becker  . A new ReflectionReference class has been added, which allows detecting
5519b335c56SChristoph M. Becker    references and comparing them for identity. For more details see the RFC:
5529b335c56SChristoph M. Becker    https://wiki.php.net/rfc/reference_reflection
5539b335c56SChristoph M. Becker
554e4e9cd83SAndrea Faulds========================================
555e4e9cd83SAndrea Faulds8. Removed Extensions and SAPIs
556e4e9cd83SAndrea Faulds========================================
557e4e9cd83SAndrea Faulds
558e4e9cd83SAndrea Faulds- Interbase:
55924b67792SChristoph M. Becker  . The interbase extension has been moved to PECL. Access to an InterBase
56024b67792SChristoph M. Becker    and/or FireBird based database is still available with the PDO_Firebird
56124b67792SChristoph M. Becker    extension. For more details see the RFC:
56224b67792SChristoph M. Becker    https://wiki.php.net/rfc/deprecate-and-remove-ext-interbase
56324b67792SChristoph M. Becker
564829b0df7SChristoph M. Becker- Recode:
565829b0df7SChristoph M. Becker  . The recode extension has been moved to PECL. For character set/encoding
566829b0df7SChristoph M. Becker    conversion the iconv or mbstring extensions could be used instead.
567829b0df7SChristoph M. Becker    RFC: https://wiki.php.net/rfc/unbundle_recode
568829b0df7SChristoph M. Becker
569c5df679cSChristoph M. Becker- WDDX:
570c5df679cSChristoph M. Becker  . The WDDX extension has been deprecated and moved to PECL.
571c5df679cSChristoph M. Becker    RFC: https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx
572c5df679cSChristoph M. Becker
5739b335c56SChristoph M. Becker========================================
5749b335c56SChristoph M. Becker9. Other Changes to Extensions
5759b335c56SChristoph M. Becker========================================
5769b335c56SChristoph M. Becker
57777e1a1abSChristopher Jones DBA:
578d27b76a7SBob Weinand   . As of PHP 7.4.2, dba_open() accepts a fifth optional parameter for lmdb
57977e1a1abSChristopher Jones     databases which allows to specify the mapsize. The parameter defaults to
58084e34802SRasmus Lerdorf     zero, in which case the compiled in default mapsize (usually 1048576) will
58185021a39SBenjamin Morel     be used. The mapsize should be a multiple of the page size of the OS.
58264881a1eSPierrick Charron
58302b2dbb7SPierrick Charron- GD:
58402b2dbb7SPierrick Charron  . The behavior of imagecropauto() in the bundled libgd has been synced with
58564881a1eSPierrick Charron    that of system libgd:
58664881a1eSPierrick Charron     * IMG_CROP_DEFAULT is no longer falling back to IMG_CROP_SIDES
58702b2dbb7SPierrick Charron     * Threshold-cropping now uses the algorithm of system libgd
58802b2dbb7SPierrick Charron  . The default $mode parameter of imagecropauto() has been changed to
58964881a1eSPierrick Charron    IMG_CROP_DEFAULT; passing -1 is now deprecated.
59002b2dbb7SPierrick Charron  . imagescale() now supports aspect ratio preserving scaling to a fixed height
59164881a1eSPierrick Charron    by passing -1 as $new_width.
59264881a1eSPierrick Charron
59302b2dbb7SPierrick Charron- Filter:
59402b2dbb7SPierrick Charron  . The filter extension no longer exposes --with-pcre-dir for Unix builds and
59564881a1eSPierrick Charron    can now reliably be built as shared when using ./configure once more.
59602b2dbb7SPierrick Charron
59702b2dbb7SPierrick Charron- Hash:
59802b2dbb7SPierrick Charron  . The hash extension cannot be disabled anymore and is always an integral part
59902b2dbb7SPierrick Charron    of any PHP build, similar to the date extension.
60002b2dbb7SPierrick Charron
60164881a1eSPierrick Charron- Intl:
60264881a1eSPierrick Charron  . The Intl extension now requires at least ICU 50.1.
60364881a1eSPierrick Charron  . ResourceBundle now implements Countable.
60464881a1eSPierrick Charron
60502b2dbb7SPierrick Charron- Ldap:
60602b2dbb7SPierrick Charron  . Support for nsldap has been removed.
60764881a1eSPierrick Charron  . Support for umich_ldap has been removed.
60864881a1eSPierrick Charron
60964881a1eSPierrick Charron- Libxml:
61064881a1eSPierrick Charron  . All libxml based extensions now require libxml 2.7.6 or newer.
61102b2dbb7SPierrick Charron
61202b2dbb7SPierrick Charron- Mbstring:
61302b2dbb7SPierrick Charron  . The oniguruma library is no longer bundled with PHP, instead libonig needs
61402b2dbb7SPierrick Charron    to be available on the system. Alternatively --disable-mbregex can be used
61502b2dbb7SPierrick Charron    to disable the mbregex component.
61602b2dbb7SPierrick Charron
61702b2dbb7SPierrick Charron- OPcache:
61802b2dbb7SPierrick Charron  . The --disable-opcache-file|--enable-opcache-file configure options have been
61902b2dbb7SPierrick Charron    removed in favor of the opcache.file_cache INI directive.
62002b2dbb7SPierrick Charron
62102b2dbb7SPierrick Charron- PDO:
62202b2dbb7SPierrick Charron  . It is now possible to escape question marks in SQL queries to avoid them
62302b2dbb7SPierrick Charron    being interpreted as parameter placeholders. Writing "??" allows sending
62402b2dbb7SPierrick Charron    a single question mark to the database and e.g. use the PostgreSQL JSON key
62502b2dbb7SPierrick Charron    exists "?" operator. For more details see the RFC:
62602b2dbb7SPierrick Charron    https://wiki.php.net/rfc/pdo_escape_placeholders
62764881a1eSPierrick Charron
62802b2dbb7SPierrick Charron- PDO_Firebird:
62902b2dbb7SPierrick Charron  . The extension now also support dialect 1 in addition to dialect 3.
63002b2dbb7SPierrick Charron
63185021a39SBenjamin Morel- Reflection:
63202b2dbb7SPierrick Charron  . Numeric value of class, property, function and constant modifiers was
63364881a1eSPierrick Charron    changed. Don't filter methods and properties through
63402b2dbb7SPierrick Charron    ReflectionClass::getMethods() and ReflectionClass::getProperties(), or test
63564881a1eSPierrick Charron    results of Reflection...::getModifiers(), using hard-coded numeric values.
63664881a1eSPierrick Charron    Use corresponding constants instead (e.g. ReflectionMethod::IS_PUBLIC).
63702b2dbb7SPierrick Charron
63864881a1eSPierrick Charron- SimpleXML:
63902b2dbb7SPierrick Charron  . SimpleXMLElement now implements Countable.
64002b2dbb7SPierrick Charron
64102b2dbb7SPierrick Charron- SQLite3:
64202b2dbb7SPierrick Charron  . The bundled libsqlite has been removed. To build the SQLite3 extension a
64302b2dbb7SPierrick Charron    system libsqlite3 ≥ 3.7.4 is now required. To build the PDO_SQLite extension
64402b2dbb7SPierrick Charron    a system libsqlite3 ≥ 3.5.0 is now required.
64502b2dbb7SPierrick Charron  . (Un)serialization of SQLite3, SQLite3Stmt and SQLite3Result is now
6466b73e692SJavier Spagnoletti    explicitly forbidden. Formerly, serialization of instances of these classes
64764881a1eSPierrick Charron    was possible, but unserialization yielded unusable objects.
64864881a1eSPierrick Charron  . The @param notation can now also be used to denote SQL query parameters.
64964881a1eSPierrick Charron
6506b73e692SJavier Spagnoletti- Zip:
65164881a1eSPierrick Charron  . The bundled libzip library has been removed. A system libzip >= 0.11 is now
65264881a1eSPierrick Charron    necessary to build the extension.
65364881a1eSPierrick Charron
65402b2dbb7SPierrick Charron========================================
65564881a1eSPierrick Charron10. New Global Constants
65664881a1eSPierrick Charron========================================
65764881a1eSPierrick Charron
65864881a1eSPierrick Charron- Mbstring:
65964881a1eSPierrick Charron  . MB_ONIGURUMA_VERSION specifies the version of the oniguruma library against
6606b73e692SJavier Spagnoletti    which mbregex has been built.
66164881a1eSPierrick Charron
66264881a1eSPierrick Charron- Socket:
66364881a1eSPierrick Charron  . Added FreeBSD-specific socket options:
6649b335c56SChristoph M. Becker  . SO_LABEL
6659b335c56SChristoph M. Becker  . SO_PEERLABEL
6669b335c56SChristoph M. Becker  . SO_LISTENQLIMIT
66785021a39SBenjamin Morel  . SO_LISTENQLEN
668e8237705SAndrea Faulds  . SO_USER_COOKIE
669e8237705SAndrea Faulds
670e8237705SAndrea Faulds- Standard:
6719b335c56SChristoph M. Becker  . PHP_WINDOWS_EVENT_CTRL_C
6729b335c56SChristoph M. Becker  . PHP_WINDOWS_EVENT_CTRL_BREAK
6739b335c56SChristoph M. Becker
6749b335c56SChristoph M. Becker- Tidy:
6759b335c56SChristoph M. Becker  . TIDY_TAG_ARTICLE
6769b335c56SChristoph M. Becker  . TIDY_TAG_ASIDE
677fb0faf02STrevor Rowbotham  . TIDY_TAG_AUDIO
678fb0faf02STrevor Rowbotham  . TIDY_TAG_BDI
679fb0faf02STrevor Rowbotham  . TIDY_TAG_CANVAS
680fb0faf02STrevor Rowbotham  . TIDY_TAG_COMMAND
681fb0faf02STrevor Rowbotham  . TIDY_TAG_DATALIST
682fb0faf02STrevor Rowbotham  . TIDY_TAG_DETAILS
683fb0faf02STrevor Rowbotham  . TIDY_TAG_DIALOG
6841d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_FIGCAPTION
6851d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_FIGURE
6861d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_FOOTER
6871d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_HEADER
6881d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_HGROUP
6891d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_MAIN
6901d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_MARK
6911d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_MENUITEM
6921d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_METER
6931d9b46f3SKalle Sommer Nielsen  . TIDY_TAG_NAV
69455277a66SCharles R. Portwood II  . TIDY_TAG_OUTPUT
69555277a66SCharles R. Portwood II  . TIDY_TAG_PROGRESS
69655277a66SCharles R. Portwood II  . TIDY_TAG_SECTION
697cb00ca7cSCôme Chilliet  . TIDY_TAG_SOURCE
698cb00ca7cSCôme Chilliet  . TIDY_TAG_SUMMARY
699cb00ca7cSCôme Chilliet  . TIDY_TAG_TEMPLATE
700cb00ca7cSCôme Chilliet  . TIDY_TAG_TIME
701cb00ca7cSCôme Chilliet  . TIDY_TAG_TRACK
702cb00ca7cSCôme Chilliet  . TIDY_TAG_VIDEO
703cb00ca7cSCôme Chilliet
704cb00ca7cSCôme Chilliet========================================
705cb00ca7cSCôme Chilliet11. Changes to INI File Handling
706cb00ca7cSCôme Chilliet========================================
707cb00ca7cSCôme Chilliet
708cb00ca7cSCôme Chilliet- zend.exception_ignore_args
709cb00ca7cSCôme Chilliet  . New INI directive to include or exclude arguments from stack traces
710cb00ca7cSCôme Chilliet    generated for exceptions.
711cb00ca7cSCôme Chilliet
712cb00ca7cSCôme Chilliet- opcache.preload_user
713cb00ca7cSCôme Chilliet  . New INI directive to specify the user account under which preloading code
714cb00ca7cSCôme Chilliet    is executed, if it was to be run as root otherwise (which is not allowed
715cb00ca7cSCôme Chilliet    for security reasons).
716cb00ca7cSCôme Chilliet
717cb00ca7cSCôme Chilliet========================================
718cb00ca7cSCôme Chilliet12. Windows Support
719cb00ca7cSCôme Chilliet========================================
720cb00ca7cSCôme Chilliet
721cb00ca7cSCôme Chilliet- stat:
722cb00ca7cSCôme Chilliet  . The stat implementation has been refactored.
723cb00ca7cSCôme Chilliet    - An inode number is delivered and is based on the NTFS file index.
724cb00ca7cSCôme Chilliet    - The device number is now based on the volume serial number.
72577e1a1abSChristopher Jones
726d27b76a7SBob Weinand  Note that both values are derived from the system and provided as is on 64-bit
72777e1a1abSChristopher Jones  systems. On 32-bit systems, these values might overflow the 32-bit integer in
728100228aaSPierre Joye  PHP, so they're fake.
729a398df3eSKalle Sommer Nielsen
730b5052f01SChristoph M. Becker- CTRL+C and CTRL+BREAK on console can be caught by setting a handler function
731197051f3SKalle Sommer Nielsen  with sapi_windows_set_ctrl_handler().
732e5123055SNikita Popov
733e5123055SNikita Popov- configure now regards additional CFLAGS and LDFLAGS set as environment
734e5123055SNikita Popov  variables.
735e5123055SNikita Popov
736974abd8bSChristoph M. Becker- OPcache now supports an arbitrary amount of separate caches per user via
737974abd8bSChristoph M. Becker  the INI directive opcache.cache_id. All processes with the same cache ID and
738974abd8bSChristoph M. Becker  user share an OPcache instance.
739974abd8bSChristoph M. Becker
740974abd8bSChristoph M. Becker- The OpenSSL default config path has been changed to
741ce0721beSJakub Zelenka  "C:\Program Files\Common Files\SSL\openssl.cnf" and
742ce0721beSJakub Zelenka  "C:\Program Files (x86)\Common Files\SSL\openssl.cnf", respectively.
743ce0721beSJakub Zelenka
744ce0721beSJakub Zelenka========================================
745e5a99563SJakub Zelenka13. Migration to pkg-config
746e5a99563SJakub Zelenka========================================
747e5a99563SJakub Zelenka
748e5a99563SJakub ZelenkaA number of extensions have been migrated to exclusively use pkg-config for the
749e5a99563SJakub Zelenkadetection of library dependencies. Generally, this means that instead of using
750ce0721beSJakub Zelenka--with-foo-dir=DIR or similar only --with-foo is used. Custom library paths can
751ce0721beSJakub Zelenkabe specified either by adding additional directories to PKG_CONFIG_PATH or by
752ce0721beSJakub Zelenkaexplicitly specifying compilation options through FOO_CFLAGS and FOO_LIBS.
753ce0721beSJakub Zelenka
7543d5b6f23SStanislav MalyshevThe following extensions and SAPIs are affected:
7559a495911SRemi Collet
7566b73e692SJavier Spagnoletti- Curl:
7573d5b6f23SStanislav Malyshev  . --with-curl no longer accepts a directory.
758fa6fe06aSAnatol Belski
759fa6fe06aSAnatol Belski- Enchant:
760fa6fe06aSAnatol Belski  . --with-enchant no longer accepts a directory.
761fa6fe06aSAnatol Belski
762d857703bSAnatol Belski- FPM:
763d857703bSAnatol Belski  . --with-fpm-systemd now uses only pkg-config for libsystem checks. The
764d857703bSAnatol Belski    libsystemd minimum required version is 209.
765b2a1199dSAnatol Belski
766b2a1199dSAnatol Belski- GD:
767d857703bSAnatol Belski  . --with-gd becomes --enable-gd (whether to enable the extension at all) and
768d857703bSAnatol Belski    --with-external-gd (to opt into using an external libgd, rather than the
76977e1a1abSChristopher Jones    bundled one).
770fa6fe06aSAnatol Belski  . --with-png-dir has been removed. libpng is required.
77177e1a1abSChristopher Jones  . --with-zlib-dir has been removed. zlib is required.
7729b335c56SChristoph M. Becker  . --with-freetype-dir becomes --with-freetype.
7739b335c56SChristoph M. Becker  . --with-jpeg-dir becomes --with-jpeg.
7749b335c56SChristoph M. Becker  . --with-webp-dir becomes --with-webp.
775  . --with-xpm-dir becomes --with-xpm.
777- IMAP:
778  . --with-kerberos no longer accepts a directory.
780- Intl:
781  . --with-icu-dir has been removed. If --enable-intl is passed, then libicu is
782    always required.
784- Ldap:
785  . --with-ldap-sasl no longer accepts a directory.
787- Libxml:
788  . --with-libxml-dir has been removed.
789  . --enable-libxml becomes --with-libxml.
790  . --with-libexpat-dir has been renamed to --with-expat and no longer accepts a
791    directory.
793- LiteSpeed:
794  . --with-litespeed becomes --enable-litespeed.
796- Mbstring:
797  . --with-onig has been removed. Unless --disable-mbregex has been passed,
798    libonig is required.
800- ODBC:
801  . --with-iodbc no longer accepts a directory.
802  . --with-unixODBC without a directory now uses pkg-config (preferred).
803    Directory is still accepted for old versions without libodbc.pc.
805- OpenSSL:
806  . --with-openssl no longer accepts a directory.
807  . --with-kerberos no longer accepts a directory.
809- PCRE:
810  . --with-pcre-regex has been removed. Instead --with-external-pcre is provided
811    to opt into using an external PCRE library, rather than the bundled one.
813- PDO_SQLite:
814  . --with-pdo-sqlite no longer accepts a directory.
816- Readline:
817  . --with-libedit no longer accepts a directory.
819- Sodium:
820  . --with-sodium no longer accepts a directory.
822- SQLite3:
823  . --with-sqlite3 no longer accepts a directory.
825- XSL:
826  . --with-xsl no longer accepts a directory.
828- Zip:
829  . --with-libzip has been removed.
830  . --enable-zip becomes --with-zip.
83314. Other Changes
83715. Performance Improvements
840- Core:
841  . A specialized VM opcode for the array_key_exists() function has been added,
842    which improves performance of this function if it can be statically
843    resolved. In namespaced code, this may require writing \array_key_exists()
844    or explicitly importing the function.
846- PCRE:
847  . When preg_match() in UTF-8 mode ("u" modifier) is repeatedly called on the
848    same string (but possibly different offsets), it will only be checked for
849    UTF-8 validity once.