php7.2新特性彙總

Core:

  • Added ZEND_COUNT, ZEND_GET_CLASS, ZEND_GET_CALLED_CLASS, ZEND_GET_TYPE, ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement corresponding builtin functions.
  • "Countable" interface is moved from SPL to Core.
  • Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin function, through hash lookup in flipped array.
  • Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUNTED).
  • Removed the sql.safe_mode directive.
  • Removed support for Netware.
  • Renamed ReflectionClass::isIterateable() to ReflectionClass::isIterable() (alias original name for BC).
  • Raised minimum supported Windows versions to Windows 7/Server 2008 R2.
  • Implemented minor optimization in array_keys/array_values().
  • Added PHP_OS_FAMILY constant to determine on which OS we are.
  • Change PHP_OS_FAMILY value from "OSX" to "Darwin".
  • Allow loading PHP/Zend extensions by name in ini files (extension=<name>).
  • Added object type annotation.
  • Added new VM instuctions ISSET_ISEMPTY_CV and UNSET_CV. Previously they were implemented as ISSET_ISEMPTY_VAR and UNSET_VAR variants with ZEND_QUICK_SET flag.

EXIF:

  • Added support for vendor specific tags for the following formats: Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon, AGFA, Kyocera, Ricoh & Epson.
  • Deprecated the read_exif_data() alias.

Fileinfo:

  • Upgrade bundled libmagic to 5.31.

FTP:

  • Implement MLSD for structured listing of directories.
  • Added ftp_append() function.

Hash:

  • Changed HashContext from resource to object.
  • Disallowed usage of non-cryptographic hash functions with HMAC and PBKDF2.

JSON:

  • Add JSON_INVALID_UTF8_IGNORE and JSON_INVALID_UTF8_SUBSTITUTE options for json_encode and json_decode to ignore or replace invalid UTF-8 

 

LDAP:

  • Implemented FR #69445 (Support for LDAP EXOP operations)
  • Fixed support for LDAP_OPT_SERVER_CONTROLS and LDAP_OPT_CLIENT_CONTROLS in ldap_get_option
  • Fixed passing an empty array to ldap_set_option for client or server controls.

Mbstring:

  • Added array input support to mb_convert_encoding().
  • Added array input support to mb_check_encoding().
  • Update to oniguruma version 6.3.0.

Mcrypt:

  • The deprecated mcrypt extension has been moved to PECL.

Opcache:

  • Added global optimisation passes based on data flow analysis using Single Static Assignment (SSA) form: Sparse Conditional Constant Propagation (SCCP), Dead Code Elimination (DCE), and removal of unused local variables (Nikita, Dmitry)

OpenSSL:

  • Use TLS_ANY for default ssl:// and tls:// negotiation.
  • Fix leak in openssl_spki_new().
  • Added openssl_pkcs7_read() and pk7 parameter to openssl_pkcs7_verify().
  • Add ssl security_level stream option to support OpenSSL security levels. (Jakub Zelenka).
  • Allow setting SNI cert and private key in separate files.
  • Automatically load OpenSSL configuration file.

PCRE:

  • Added support for PCRE JIT fast path API.

 

PDO:

  • Add "Sent SQL" to debug dump for emulated prepares.
  • Add parameter types for national character set strings.

PDO_DBlib:

  • Expose DB-Library version as \PDO::DBLIB_ATTR_VERSION attribute on \PDO instance.

 

PDO_Sqlite:

  • Switch to sqlite3_prepare_v2() and sqlite3_close_v2() functions (rasmus)

PHPDBG:

  • Added extended_value to opcode dump output.

Session:

  • PR #2233 Removed register_globals related code and "!" can be used as $_SESSION key name.

Sodium:

  • New cryptographic extension
  • Added missing bindings for libsodium > 1.0.13.

SPL:

  • Added spl_object_id().

 

SQLite3:

  • Implement writing to blobs.
  • Update to Sqlite 3.20.1.

Standard:

  • Compatibility with libargon2 versions 20161029 and 20160821.
  • Add support for extension name as argument to dl().

Streams:

  • Default ssl/single_dh_use and ssl/honor_cipher_order to true.

XML:

  • Moved utf8_encode() and utf8_decode() to the Standard extension.

XMLRPC:

  • Use Zend MM for allocation in bundled libxmlrpc (Joe)

ZIP:

  • Add support for encrypted archives.
  • Use of bundled libzip is deprecated, --with-libzip option is recommended.
  • ZipArchive implements countable, added ZipArchive::count() method.
  • Fix segfault in php_stream_context_get_option call.

 

zlib:

  • Expose inflate_get_status() and inflate_get_read_len() functions.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章