This article mainly introduces the performance of PHP7.2 version to you in detail, hoping to help everyone have a clearer understanding of PHP7.2.
Core:
For closed resources, the gettype() function will return resource (closed), replacing the previous unknown type.
For __PHP_Incomplete_Class class object, is_object ()The function will return true.
#Remove support for Netware operating system.
array type is converted to object type ((object)orsettype() ), the integer key will be converted into an attribute name, which fixes the problem that the numeric key in the previous version cannot be used as an attribute name.
Convert object type to array type ((array)or settype() ), and when the properties of an object are mapped to an array (get_object_vars()), the integer properties will be converted into numeric keys, which fixes the previous version The problem of inaccessible integer properties.
Unqualified reference to an undefined constant will result in a warning level error, replacing the previous notice level, and subsequent versions will be error level errors. .
#The minimum supported Windows versions are Windows 7 and Windows Server 2008 R2.
Cancels the compatibility checking behavior of native trait attribute values.
object will not be used as a class name.
BcMath
## and fmod()The function is the same, the bcmod() function cancels the modulo operation (%), that is, the decimal part of the value is truncated into an integer. For example: bcmod('4', '3.5') will return 0.5 instead of 1.
Hash
##hash_hmac (), hash_hmac_file(), hash_pbkdf2() and hash_init() (when the options parameter is HASH_HMAC), these functions will no longer support non-encrypted hash functions.
json_decode()When the second parameter assoc of the function is null, the options support option JSON_OBJECT_AS_ARRAY will be enabled, before This parameter has been ignored by us in the version.
##Session#Move In addition to
related code, "!" can be used in the key name of $_SESSION.
session##sesseion_start()
session_status(), session_regenerate_id(), these functions are used to set or return the correct session state.
##session_unset(), session_write_close()/ session_commit(), session_abort(), session_reset(), these functions return no return value. Returns a Boolean value. They allow empty parameters and have checks for these empty.
##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(), these functions will disable invalid session status and http header status, and return the correct Boolean value or numerical value.
##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_pior, session.gc_maxlifetime, the setting of these ini values must be successfully called by the ini_set() function , invalid ini modification operations will not succeed.
session_start()), some E_ERROR Error messages of level will be converted to level E_WARNING.
session_name(), session_module_name(), session_save_path(), session_cache_limiter() and session_cache_expire() These functions).
Now these correct behaviors will affect the state of management sessions in cli command line mode. Using output buffering as in web applications will solve the problem with cli scripts.
Since version 7.1 , on a 64-bit machine, the order of random numbers generated by
mt_rand()and rand() with the same seed may be different. Same.
##2. New Features
Core
Allows the inherited abstract class to override the abstract method of the inherited abstract class.
# Allows trailing commas to group namespaces.
#Annotations for object types are allowed.
##DBA
##Implementation Added support for LMDB backend.
json_encode() and json_decode() Added support for JSON_INVALID_IGNORE and ## Support for #JSON_INVALTD_UTF8_SUBSTITUTE replaces the previous utf-8 encoded invalid type. ##OCI8
##increase Provides support for Transparent Application Failover (TAF) of Oracle Database.
PCRE
##increase Internal option (j) modifies the local
PCRE_DUPNAMESSodium
##New encryption extension.
##SQLite3
##Implementation to write BLOBs.
windows platform supports the
function.
Zip
ZipArchive:: setEncryptionName($name, $method[,$password]); ZipArchive::setEncryptionIndex($index, $method[ , $ password]); New constants: ZipArchive:: EM_NONE ZipArchive:: EM_AES_128 ZipArchive:: EM_AES_192 ZipArchive:: EM_AES_256
##Accepts "password" from the zip stream context. ZipArchive implements countability and adds the ZipArchive::count()
method.4. Deprecated functionality
Core
## Track errors in the configuration file will be Abandoned.
##__autoload()
will be deprecated, useinstead.
(unset) will be abandoned. This change will not affect unset ($var) language structure.
create_function()The function will be deprecated and replaced by an anonymous function. ##each()
foreach()Loop instead.
##read_exif_data () will be deprecated, use
exif_read_data()
png2wbmp() and jpeg2wbmp() will be deprecated. GMP ##gmp_random () will be deprecated, use gmp_random_bits() or () instead. Intl #INTL_IDNA_VARIANT_2003 will be deprecated, use INTL_IDNA_VARIANT_UTS46 instead. Mbstring ##mbstring The configuration file of .func_overload will be discarded.
parse_str() will be discarded. with string parameters will be deprecated and use regular expressions instead. Standard
PASSWORD_ARGON2I, password_hash()Argon2 hash can be generated. memory_cost , time_cost. The default value for these options is PASSWORD_ARGON2_DEFAULT_MEMORY_COST. If not set, the defaults are PASSWORD_ARGON2_DEFAULT_TIME_COST and PASSWORD_ARGON2_DEFAULT_THREADS. Argon2 hashes can be verified. password_needs_rehash() can Accepts Argon2 hashes. #mail()/mb_send_mail() $extra_header . Array parameters are checked against RFC 2822. Array format: php $extra_headers = [ 'Header-Name' => 'Header value', 'Multiple' => ['One header', 'Another header'], 'Multiline' = " FirstLine\r\n SecondLine", ]; ##When an invalid parameter is passed, count() In big-endian and little-endian byte order, pack() Supports float and double types. number_format() ##XML #utf8_encode () and 6. New functions
Add stream_istty() Addedsapi_windows_vt100_support() ##DOM Implemented Countable and added DomNodeList::count() DOMNamedNodeMapImplements Countable and adds DOMNamedNodeMap::count(). FTP ##increase ftp_append(). GD ##increase imagesetclip() and imagegetclip(). Addedimageopenpolygon(). Addedimageresolution(). Added imagecreatefrombmp() and imagebmp( ). Hash ##increase hash_hmac_algos().
mb_chr() and mb_ord(). mb_scrub. ##increase Added and oci_unregister_taf_callback() support for Transparent Application Failover (TAF) for Oracle databases. Sockets ##increase The , socket_addrinfo_connect(), socket_addrinfo_bind() and socket_addrinfo_explain(). SPL ##increase 7. New classes and interfaces 8. Move Extensions and SAPI Mcypt # #The deprecated mcrypt extension has been moved to PECL. libmcrypt has not been maintained since 2007 and continued use of this extension is not recommended.
Added exif tag support for the following formats: Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon, AGFA, Kyocera, Ricoh & Epson. ##exif_read_data() and ##GD --enable-gd-native-ttf configuration option. imagegd() Store the truecolor image as a true color image, replacing the previous conversion to color correction plate. mageantialias() is also supported when compiling with system libgd. Mbstring Accepts an array parameter and recursively checks its keys and values. Accepts an array parameter, the encoding of its value can be converted recursively. PDO_OCI ##--with-pdo-oci The configuration syntax of is no longer available for Oracle clients. ##pdo_sqlite ##Use sqlite3_prepare_v2() and sqlite3_close_v2() to replace their previous functions. Core
##PHP_FLOAT_EPSILON PHP_FLOAT_MIN PHP_FLOAT_MAX PHP_OS_FAMILY Fileinfo ##FILEINFO_EXTENSION GD #IMG_EFFECT_MULTIPLY IMG_BMP ##PCRE PREG_UNMATCHED_AS_NULL ##Standard: ##PASSWORD_ARGON2_DEFAULT_MEMORY_COST PASSWORD_ARGON2_DEFAULT_THREADS ##PASSWORD_ARGON2I 11. Changes in INI file handling sql.safe_mode
##opcache.fast_shutdown This INI option has been removed. A variant of fast_shutdown handling has been integrated into the PHP kernel and will be enabled by default in production environments. 12. Windows support Support VT100 console mode. 13. Other changes Compilation system The minimum supported version of autoconf is 2.64. Related recommendations: Introduction to new features in PHP7
Standard
##DomNodeList
Mbstring
socket_addrinfo_lookup()
EXIF
##Move In addition to the
10. New global constant
##PASSWORD_ARGON2_DEFAULT_TIME_COST
realpath_cache_size
How to install IIS, MySQ, nginx, php7.1.7 under Win10?