2016-09-02 05:15:47 +00:00
|
|
|
|
PHP 7.2 UPGRADE NOTES
|
2012-03-05 20:14:04 +00:00
|
|
|
|
|
|
|
|
|
1. Backward Incompatible Changes
|
|
|
|
|
2. New Features
|
2014-05-01 10:27:38 +00:00
|
|
|
|
3. Changes in SAPI modules
|
|
|
|
|
4. Deprecated Functionality
|
|
|
|
|
5. Changed Functions
|
|
|
|
|
6. New Functions
|
|
|
|
|
7. New Classes and Interfaces
|
2015-02-10 07:56:18 +00:00
|
|
|
|
8. Removed Extensions and SAPIs
|
2014-05-01 10:27:38 +00:00
|
|
|
|
9. Other Changes to Extensions
|
|
|
|
|
10. New Global Constants
|
|
|
|
|
11. Changes to INI File Handling
|
2014-08-22 11:35:07 +00:00
|
|
|
|
12. Windows Support
|
|
|
|
|
13. Other Changes
|
2010-03-24 16:23:50 +00:00
|
|
|
|
|
2005-11-22 23:49:13 +00:00
|
|
|
|
|
2010-03-24 16:23:50 +00:00
|
|
|
|
========================================
|
2012-03-05 20:14:04 +00:00
|
|
|
|
1. Backward Incompatible Changes
|
2010-03-24 16:23:50 +00:00
|
|
|
|
========================================
|
2016-04-24 21:49:52 +00:00
|
|
|
|
|
2015-10-14 18:15:32 +00:00
|
|
|
|
- Core:
|
2016-07-22 17:16:43 +00:00
|
|
|
|
. gettype() will now return "resource (closed)" instead of "unknown type" for
|
|
|
|
|
closed resources.
|
2016-07-22 19:53:20 +00:00
|
|
|
|
. is_object() will now return true for objects of class
|
|
|
|
|
__PHP_Incomplete_Class.
|
2016-11-12 10:20:01 +00:00
|
|
|
|
. Support for Netware operating systems have been removed.
|
2016-11-14 18:20:45 +00:00
|
|
|
|
. Casting arrays to objects (with (object) or settype()) will now covert
|
|
|
|
|
integer keys to string property names. This fixes the behaviour of previous
|
|
|
|
|
versions, where integer keys would become inaccessible properties with
|
|
|
|
|
integer names.
|
2016-11-14 21:32:39 +00:00
|
|
|
|
. Casting objects to arrays (with (array) or settype()), and retrieving
|
2016-11-14 18:20:45 +00:00
|
|
|
|
object properties in an array with get_object_vars(), will now convert
|
|
|
|
|
numeric string property names (that is, property names of the format
|
|
|
|
|
/^(0|(-?[1-9][0-9]*))$/ where PHP_INT_MIN <= n <= PHP_INT_MAX) to integer
|
|
|
|
|
keys. This fixes the behaviour of previous versions, where numeric string
|
|
|
|
|
property names would become inaccessible string keys.
|
2016-07-17 16:13:24 +00:00
|
|
|
|
|
2016-11-17 02:09:07 +00:00
|
|
|
|
- Session:
|
|
|
|
|
. Session is made to manage session status corretly and prevents invalid operations.
|
|
|
|
|
Only inappropriate codes are affected by this change. If you have problems with this,
|
|
|
|
|
it means you have problem in your code.
|
|
|
|
|
. Functions are made to set or return correct session status.
|
|
|
|
|
session_start(), session_status(), session_regenerate_id()
|
|
|
|
|
. Functions are made to return bool from null. These functions have void parameter
|
|
|
|
|
and void parameter is checked.
|
|
|
|
|
session_unset(), session_write_close()/session_commit(), session_abort(),
|
|
|
|
|
session_reset()
|
|
|
|
|
. Functions prohibit invalid operations with regard to session status and
|
|
|
|
|
HTTP header status, returns correct bool return value.
|
|
|
|
|
session_start(), session_set_cookie_params(), session_name(), session_module_name(),
|
|
|
|
|
session_set_save_handler(), session_regenerate_id(), session_cache_limiter(),
|
|
|
|
|
session_cache_expire(), session_unset(), session_destroy(),
|
|
|
|
|
session_write_close()/session_commit(), session_reset()
|
|
|
|
|
. INI value change by ini_set() returns update status correctly. Invalid INI modifications
|
|
|
|
|
are checked and made to fail.
|
|
|
|
|
session.name, session.save_path, session.cookie_lifetime, session.cookie_path,
|
|
|
|
|
session.cookie_domain, session.cookie_httponly, session.cookie_secure,
|
|
|
|
|
session.use_cookies, session.use_only_cookies, session.use_strict_mode,
|
|
|
|
|
session.referer_check, session.cache_limiter, session.cache_expire,
|
|
|
|
|
session.lazy_write, session.save_handler, session.serialize_handler,
|
|
|
|
|
session.gc_probability, session.gc_divior, session.gc_maxlifetime,
|
|
|
|
|
. Some E_ERRORs are changed to E_WARNING since session status is managed correctly.
|
|
|
|
|
session_start()
|
|
|
|
|
. Session no longer initialize $_SESSION for invalid and useless session.
|
|
|
|
|
session_start()
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
|
|
|
|
2. New Features
|
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
2016-09-05 09:27:46 +00:00
|
|
|
|
- PCRE:
|
|
|
|
|
. Added `J` modifier for setting PCRE_DUPNAMES.
|
|
|
|
|
|
2016-09-08 17:59:21 +00:00
|
|
|
|
- Standard:
|
|
|
|
|
. Simplified password hashing API updated to support Argon2i hashes when PHP is compiled with libargon2
|
|
|
|
|
(https://wiki.php.net/rfc/argon2_password_hash).
|
2016-10-16 02:17:35 +00:00
|
|
|
|
. proc_nice() is now supported on Windows platforms.
|
2016-09-08 17:59:21 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
3. Changes in SAPI modules
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
4. Deprecated Functionality
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
2016-11-13 22:17:25 +00:00
|
|
|
|
- GD:
|
|
|
|
|
. png2wbmp() and jpeg2wbmp() have been deprecated, and will be removed as of
|
|
|
|
|
PHP 8.0.0.
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
5. Changed Functions
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2009-06-23 19:40:31 +00:00
|
|
|
|
|
2016-09-08 17:59:21 +00:00
|
|
|
|
- Standard:
|
|
|
|
|
. password_hash() can generate Argon2i hashes when the algorithm is set to PASSWORD_ARGON2I.
|
|
|
|
|
When using PASSWORD_ARGON2I, the following cost factors may be set: 'memory_cost', 'time_cost',
|
|
|
|
|
and 'threads'. These cost factors will default to 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST',
|
|
|
|
|
'PASSWORD_ARGON2_DEFAULT_TIME_COST', and 'PASSWORD_ARGON2_DEFAULT_THREADS' respectively if not set.
|
|
|
|
|
. password_verify() can verify Argon2i hashes.
|
|
|
|
|
. password_get_info() and password_needs_rehash() can accept Argon2i hashes.
|
2016-09-14 21:26:31 +00:00
|
|
|
|
. mail()/mb_send_mail() accept array $extra_header. Array paramter is checked against RFC 2822.
|
|
|
|
|
Array format is
|
|
|
|
|
$extra_headers = [
|
|
|
|
|
'Header-Name' => 'Header value',
|
|
|
|
|
'Multiple' => ['One header', 'Another header'],
|
|
|
|
|
'Multiline' = "FirstLine\r\n SecondLine",
|
|
|
|
|
];
|
|
|
|
|
|
2016-10-17 14:44:16 +00:00
|
|
|
|
- XML:
|
|
|
|
|
. utf8_encode() and utf8_decode() have been moved to the Standard extension
|
|
|
|
|
as string functions.
|
2016-09-08 17:59:21 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
6. New Functions
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2016-07-06 19:06:01 +00:00
|
|
|
|
|
2016-10-28 18:27:32 +00:00
|
|
|
|
- Core:
|
|
|
|
|
. Added stream_isatty().
|
|
|
|
|
. Added sapi_windows_vt100_support().
|
|
|
|
|
|
2016-09-24 13:35:32 +00:00
|
|
|
|
- GD:
|
|
|
|
|
. Added imagesetclip() and imagegetclip().
|
2016-10-17 08:35:56 +00:00
|
|
|
|
. Added imageopenpolygon().
|
2016-10-20 10:59:03 +00:00
|
|
|
|
. Added imageresolution().
|
2016-07-06 19:06:01 +00:00
|
|
|
|
|
2016-08-10 00:47:27 +00:00
|
|
|
|
- Mbstring:
|
|
|
|
|
. Added mb_chr() and mb_ord().
|
2016-08-15 20:59:41 +00:00
|
|
|
|
. Added mb_scurb() that scrub broken multibyte strings.
|
2016-07-04 04:35:40 +00:00
|
|
|
|
|
2016-09-02 18:19:09 +00:00
|
|
|
|
- Sockets:
|
|
|
|
|
. Added socket_addrinfo_lookup(), socket_addrinfo_connect(),
|
|
|
|
|
socket_addrinfo_bind() and socket_addrinfo_explain().
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
7. New Classes and Interfaces
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2015-02-10 07:56:18 +00:00
|
|
|
|
8. Removed Extensions and SAPIs
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2009-01-28 17:23:28 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
9. Other Changes to Extensions
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2016-07-03 10:43:30 +00:00
|
|
|
|
|
2016-08-05 05:54:36 +00:00
|
|
|
|
- EXIF:
|
2016-08-06 10:39:05 +00:00
|
|
|
|
. Added extended exif tag support for the following formats:
|
|
|
|
|
Samsung, DJI, Panasonic, Sony, Pentax, Minolta & Sigma/Foveon.
|
2016-08-05 05:54:36 +00:00
|
|
|
|
|
2016-09-13 22:28:36 +00:00
|
|
|
|
- GD:
|
2016-10-02 10:47:22 +00:00
|
|
|
|
. Removed --enable-gd-native-ttf configuration option which was unused as
|
|
|
|
|
of PHP 5.5.0 anyway.
|
|
|
|
|
. imagegd() stores truecolor images as real truecolor images. Formerly, they
|
|
|
|
|
have been converted to palette.
|
|
|
|
|
. imageantialias() is now also available if compiled with a system libgd.
|
2016-09-13 22:28:36 +00:00
|
|
|
|
|
2016-09-02 05:15:47 +00:00
|
|
|
|
- Mbstring
|
|
|
|
|
. mb_check_encoding() accepts array parameter. Both key and value
|
|
|
|
|
ecodings are checked recursively.
|
2016-09-06 09:20:24 +00:00
|
|
|
|
. mb_convert_encoding() accepts array parameter. Only value encodings
|
|
|
|
|
are converted recursively.
|
2016-09-02 05:15:47 +00:00
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
10. New Global Constants
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2010-03-24 16:23:50 +00:00
|
|
|
|
|
2016-10-26 19:10:17 +00:00
|
|
|
|
- Core:
|
2016-10-28 18:49:12 +00:00
|
|
|
|
. PHP_FLOAT_DIG number of decimal digits, that can be rounded into a
|
|
|
|
|
float and back without precision loss
|
|
|
|
|
. PHP_FLOAT_EPSILON smallest representable positive number x, so then
|
|
|
|
|
x + 1.0 != 1.0
|
2016-10-28 21:02:38 +00:00
|
|
|
|
. PHP_FLOAT_MIN min representable float number
|
|
|
|
|
. PHP_FLOAT_MAX max representable float number
|
2016-10-26 19:10:17 +00:00
|
|
|
|
|
2016-10-02 17:06:59 +00:00
|
|
|
|
- GD:
|
|
|
|
|
. IMG_EFFECT_MULTIPLY
|
|
|
|
|
|
2016-09-08 17:59:21 +00:00
|
|
|
|
- Standard:
|
|
|
|
|
. PASSWORD_ARGON2_DEFAULT_MEMORY_COST
|
|
|
|
|
. PASSWORD_ARGON2_DEFAULT_TIME_COST
|
|
|
|
|
. PASSWORD_ARGON2_DEFAULT_THREADS
|
|
|
|
|
. PASSWORD_ARGON2I
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-05-01 10:27:38 +00:00
|
|
|
|
11. Changes to INI File Handling
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2010-08-30 09:38:47 +00:00
|
|
|
|
|
2016-08-11 03:06:55 +00:00
|
|
|
|
- sql.safe_mode
|
|
|
|
|
. This INI directive have been removed.
|
|
|
|
|
|
2014-08-22 11:35:07 +00:00
|
|
|
|
========================================
|
|
|
|
|
12. Windows Support
|
|
|
|
|
========================================
|
|
|
|
|
|
2016-10-28 18:27:32 +00:00
|
|
|
|
- Support for VT100 console mode
|
|
|
|
|
|
|
|
|
|
On systems starting with 10.0.10586, cmd.exe supports ANSI escape sequences.
|
|
|
|
|
The corresponding console mode is enabled by default on CLI on suitable
|
|
|
|
|
systems. As well, the function sapi_windows_vt100_support() is provided,
|
|
|
|
|
to control and query the corresponding information in the scripts.
|
|
|
|
|
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2014-08-22 11:35:07 +00:00
|
|
|
|
13. Other Changes
|
2012-03-05 20:14:04 +00:00
|
|
|
|
========================================
|
2012-07-14 20:44:21 +00:00
|
|
|
|
|