Other modifications
CURL module: It is forbidden to disable the CURLOPT_SAFE_UPLOAD option, and the curl_file/CURLFILE interface must be used to upload files through curl.
DATE module: The mktime() and gmmktime() functions have removed the $is_dst parameter.
- DBA module: dba_delete() will return false if the key is not found in the inifile.
- GMP module: libgmp version 4.2 or above must be used. gmp_setbit() and gmp_clrbit() will return false if the passed index is a negative number.
- Intl module: removed the alias functions datefmt_set_timezone_id() and IntlDateFormatter::setTimeZoneID(), use datefmt_set_timezone() and IntlDateFormatter::setTimeZone()
- libxml module: added ibxml 2.9. 0 introduced the LIBXML_BIGLINES option, and added line number > 16-bit support in error reporting.
- Mcrypt module: Removed mcrypt_generic_end() mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb()
- Opcache: Removed opcache.load_comments configuration item, now commented Loading is always activated.
- OpenSSL: Removed "rsa_key_size", "CN_match", "SNI_server_name" options.
- PCRE: Removed support for /e (PREG_REPLACE_EVAL) modifier, use preg_replace_callback() instead.
- PDO_pgsql: Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT option.
- Standard: Removed support for string types in the setlocale() function, using LC_* constants. Removed set_magic_quotes_runtime() magic_quotes_runtime().
- JSON: json_decode() rejects number formats incompatible with RFC 7159. When the first parameter of json_decode is a null value, a json syntax error will be returned.
- Stream: Remove alias function set_socket_blocking()
- XSL: Remove xsl.security_prefs option.
- session
- session_start() can accept all INI settings and can be passed in as an array, such as: ['cache_limiter'=>'private']
- save handler accepts validate_sid(), update_timestamp(), which can be used to check whether sid exists and update the timestamp of session data.
- Added SessionUpdateTimestampHandlerInterface, which defines the validateSid(), updateTimestamp() methods.
session.lazy_write(default=On) The configuration item allows data to be written only when the session data changes.
##PHP 7 Session Options
PHP 7 session_start( ) function can receive an array as a parameter and can override the session configuration items in php.ini. This feature also introduces a new php.ini setting (session.lazy_write), which is set to true by default, meaning that session data is only written when it changes. In addition to the regular session configuration directives, you can also include read_and_close options in this array. If the value of this option is set to TRUE, the session file will be closed immediately after reading, thus avoiding unnecessary file locks when the session data has not changed.Example
Set the cache_limiter to private and close it immediately after reading the session.
<?php session_start([ 'cache_limiter' => 'private', 'read_and_close' => true, ]); ?>