2018-07-31 21:54:03 +08:00
|
|
|
PHP 7.4 UPGRADE NOTES
|
2012-03-06 04:14:04 +08:00
|
|
|
|
|
|
|
1. Backward Incompatible Changes
|
|
|
|
2. New Features
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
|
|
|
4. Deprecated Functionality
|
|
|
|
5. Changed Functions
|
|
|
|
6. New Functions
|
|
|
|
7. New Classes and Interfaces
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
|
|
|
10. New Global Constants
|
|
|
|
11. Changes to INI File Handling
|
2014-08-22 19:35:07 +08:00
|
|
|
12. Windows Support
|
|
|
|
13. Other Changes
|
2010-03-25 00:23:50 +08:00
|
|
|
|
2005-11-23 07:49:13 +08:00
|
|
|
|
2010-03-25 00:23:50 +08:00
|
|
|
========================================
|
2012-03-06 04:14:04 +08:00
|
|
|
1. Backward Incompatible Changes
|
2010-03-25 00:23:50 +08:00
|
|
|
========================================
|
2016-04-25 05:49:52 +08:00
|
|
|
|
2018-11-26 20:20:51 +08:00
|
|
|
- Curl:
|
|
|
|
. Attempting to serialize a CURLFile class will now generate an exception.
|
|
|
|
Previously the exception was only thrown on unserialization.
|
|
|
|
|
2018-10-10 18:00:57 +08:00
|
|
|
- Date:
|
|
|
|
. Calling var_dump() or similar on a DateTime(Immutable) instance will no
|
|
|
|
longer leave behind accessible properties on the object.
|
|
|
|
|
2018-09-15 20:37:55 +08:00
|
|
|
- Intl:
|
|
|
|
. The default parameter value of idn_to_ascii() and idn_to_utf8() is now
|
|
|
|
INTL_IDNA_VARIANT_UTS46 instead of the deprecated INTL_IDNA_VARIANT_2003.
|
|
|
|
|
2018-11-26 20:28:14 +08:00
|
|
|
- PDO:
|
2018-11-26 20:30:57 +08:00
|
|
|
. Attempting to serialize a PDO or PDOStatement instance will now generate
|
|
|
|
an Exception rather than a PDOException, consistent with other internal
|
|
|
|
classes which do not support serialization.
|
2018-11-26 20:28:14 +08:00
|
|
|
|
2018-09-29 20:47:57 +08:00
|
|
|
- Reflection:
|
|
|
|
. Reflection objects will now generate an exception if an attempt is made
|
|
|
|
to serialize them. Serialization for reflection objects was never
|
|
|
|
supported and resulted in corrupted reflection objects. It has been
|
|
|
|
explicitly prohibited now.
|
|
|
|
|
2018-10-10 18:00:57 +08:00
|
|
|
- SPL:
|
|
|
|
. Calling get_object_vars() on an ArrayObject instance will now always return
|
|
|
|
the properties of the ArrayObject itself (or a subclass). Previously it
|
|
|
|
returned the values of the wrapped array/object unless the STD_PROP_LIST
|
|
|
|
flag was specified. Other affected operations are:
|
|
|
|
|
|
|
|
* ReflectionObject::getProperties()
|
|
|
|
* reset(), current(), etc. Use Iterator methods instead.
|
|
|
|
* Potentially others working on object properties as a list.
|
|
|
|
|
|
|
|
(array) casts are *not* affected. They will continue to return either the
|
|
|
|
wrapped array, or the ArrayObject properties, depending on whether the
|
|
|
|
STD_PROP_LIST flag is used.
|
2018-11-16 04:05:05 +08:00
|
|
|
. SplPriorityQueue::setExtractFlags() will throw an exception if zero is
|
|
|
|
passed. Previously this would generate a recoverable fatal error on the
|
|
|
|
next extraction operation.
|
2018-10-10 18:00:57 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
|
|
|
2. New Features
|
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2018-10-01 13:24:04 +08:00
|
|
|
- PDO_OCI:
|
|
|
|
. PDOStatement::getColumnMeta is now available
|
|
|
|
|
2018-09-21 21:00:07 +08:00
|
|
|
- PDO_SQLite:
|
|
|
|
. PDOStatement::getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT) allows to
|
|
|
|
check whether this statement is read-only, i.e. whether it doesn't modify
|
|
|
|
the database.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
3. Changes in SAPI modules
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
4. Deprecated Functionality
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2018-09-30 02:58:17 +08:00
|
|
|
- Core:
|
|
|
|
. Unbinding $this of a non-static method through a combination of
|
|
|
|
ReflectionMethod::getClosure() and closure rebinding is deprecated. Doing
|
|
|
|
so is equivalent to calling a non-static method statically, which has been
|
|
|
|
deprecated since PHP 7.0.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
5. Changed Functions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-06-24 03:40:31 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
6. New Functions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2015-04-24 23:19:58 +08:00
|
|
|
|
2018-11-15 17:46:48 +08:00
|
|
|
- OpenSSL:
|
|
|
|
. Added openssl_x509_verify(mixed cert, mixed key) function that verifies the
|
|
|
|
signature of the certificate using a public key. A wrapper around the
|
|
|
|
OpenSSL's X509_verify() function.
|
|
|
|
See <https://github.com/php/php-src/pull/3624>.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
7. New Classes and Interfaces
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2015-02-10 15:56:18 +08:00
|
|
|
8. Removed Extensions and SAPIs
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2009-01-29 01:23:28 +08:00
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
9. Other Changes to Extensions
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2016-07-03 18:43:30 +08:00
|
|
|
|
2018-05-15 05:25:37 +08:00
|
|
|
- GD:
|
|
|
|
. Freetype detection now relies on pkg-config. The --with-freetype-dir option
|
|
|
|
has been renamed to --enable-freetype and no longer accepts a directory.
|
|
|
|
Instead pkg-config environment variables can be used to configure custom paths,
|
|
|
|
see either ./configure --help or follow the instructions in error messages.
|
|
|
|
|
2018-10-03 14:47:07 +08:00
|
|
|
- Hash:
|
2018-10-13 20:17:28 +08:00
|
|
|
. The hash extension cannot be disabled anymore and is always an integral
|
2018-10-03 14:47:07 +08:00
|
|
|
part of any PHP build, similar to the date extension.
|
|
|
|
|
2018-09-06 20:04:44 +08:00
|
|
|
- Intl:
|
|
|
|
. The Intl extension now requires at least ICU 50.1.
|
|
|
|
|
2018-09-16 17:48:48 +08:00
|
|
|
- Libxml:
|
|
|
|
. All libxml based extensions now require libxml 2.7.6 or newer.
|
|
|
|
|
2018-09-11 22:21:17 +08:00
|
|
|
- Reflection:
|
|
|
|
. Numeric value of class, property, function and constant modifiers was
|
|
|
|
changed. Don't filter methods and properties through
|
|
|
|
ReflectionClass::getMethods() and ReflectionClass::getProperties(), or test
|
|
|
|
results of Reflection...::getModifiers(), using hard-coded numeric values.
|
|
|
|
Use corresponding constants instead (e.g. ReflectionMethod::IS_PUBLIC).
|
|
|
|
|
2018-10-06 18:44:50 +08:00
|
|
|
- SQLite3:
|
2018-10-13 20:17:28 +08:00
|
|
|
. The bundled libsqlite has been removed. To build the SQLite3 and/or
|
2018-10-13 18:15:58 +08:00
|
|
|
PDO_SQLite extensions a system libsqlite3 ≥ 3.5.0 is now required.
|
2018-11-29 08:08:03 +08:00
|
|
|
. (Un)serialization of SQLite3, SQLite3Stmt and SQLite3Result is now explictly
|
|
|
|
forbidden. Formerly, serialization of instances of these classes was
|
|
|
|
possible, but unserialization yielded unusable objects.
|
2018-11-11 21:55:34 +08:00
|
|
|
. The @param notation can now also be used to denote SQL query parameters.
|
2018-10-06 18:44:50 +08:00
|
|
|
|
2018-09-17 23:24:06 +08:00
|
|
|
- Zip:
|
|
|
|
. The bundled libzip library has been removed. A system libzip >= 0.11 is now
|
|
|
|
necessary to build the extension.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
10. New Global Constants
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-03-25 00:23:50 +08:00
|
|
|
|
2018-10-27 22:17:09 +08:00
|
|
|
- Tidy:
|
|
|
|
. TIDY_TAG_ARTICLE
|
|
|
|
. TIDY_TAG_ASIDE
|
|
|
|
. TIDY_TAG_AUDIO
|
|
|
|
. TIDY_TAG_BDI
|
|
|
|
. TIDY_TAG_CANVAS
|
|
|
|
. TIDY_TAG_COMMAND
|
|
|
|
. TIDY_TAG_DATALIST
|
|
|
|
. TIDY_TAG_DETAILS
|
|
|
|
. TIDY_TAG_DIALOG
|
|
|
|
. TIDY_TAG_FIGCAPTION
|
|
|
|
. TIDY_TAG_FIGURE
|
|
|
|
. TIDY_TAG_FOOTER
|
|
|
|
. TIDY_TAG_HEADER
|
|
|
|
. TIDY_TAG_HGROUP
|
|
|
|
. TIDY_TAG_MAIN
|
|
|
|
. TIDY_TAG_MARK
|
|
|
|
. TIDY_TAG_MENUITEM
|
|
|
|
. TIDY_TAG_METER
|
|
|
|
. TIDY_TAG_NAV
|
|
|
|
. TIDY_TAG_OUTPUT
|
|
|
|
. TIDY_TAG_PROGRESS
|
|
|
|
. TIDY_TAG_SECTION
|
|
|
|
. TIDY_TAG_SOURCE
|
|
|
|
. TIDY_TAG_SUMMARY
|
|
|
|
. TIDY_TAG_TEMPLATE
|
|
|
|
. TIDY_TAG_TIME
|
|
|
|
. TIDY_TAG_TRACK
|
|
|
|
. TIDY_TAG_VIDEO
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-05-01 18:27:38 +08:00
|
|
|
11. Changes to INI File Handling
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2010-08-30 17:38:47 +08:00
|
|
|
|
2014-08-22 19:35:07 +08:00
|
|
|
========================================
|
|
|
|
12. Windows Support
|
|
|
|
========================================
|
|
|
|
|
2018-10-04 01:11:31 +08:00
|
|
|
- stat:
|
|
|
|
. The stat implementation has been refactored.
|
|
|
|
- An inode number is delivered and is based on the NTFS file index.
|
|
|
|
- The device number is now based on the volume serial number.
|
|
|
|
|
|
|
|
Note, that both values derived from the system and provided as is on 64-bit
|
|
|
|
systems. On 32-bit system, these values might overflow the 32-bit integer in
|
|
|
|
PHP, so they're a fake.
|
|
|
|
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|
2014-08-22 19:35:07 +08:00
|
|
|
13. Other Changes
|
2012-03-06 04:14:04 +08:00
|
|
|
========================================
|