PHP 8.5.0 正式發布!

PHP 團隊發布 8.5.0 正式版本,帶來許多的改進和新功能,包含 URI 擴充、Pipe 運算元,以及新的常數和異常補捉等,並且刪除了之前已棄用的語法和功能。

New Features in PHP 8.5

  • Pipe operator (|>)
  • Filter: Support to throw exceptions on validation failures
  • Intl: New IntlListFormatter class
  • New max_memory_limit INI directive to set a ceiling memory_limit
  • Curl: New curl_multi_get_handles function
  • CLI: php --ini=diff to output non-default INI directives
  • New array_first and array_last functions
  • New locale_is_right_to_left function and Locale::isRightToLeft method
  • Stack trace support for PHP Fatal errors
  • New get_exception_handler and get_error_handler functions
  • New PHP_BUILD_PROVIDER constant
  • New PHP_BUILD_DATE constant

Deprecations in PHP 8.5

  • xml_parser_free function deprecated as it is no-op in PHP >= 8.0
  • socket_set_timeout function deprecated in favor of stream_set_timeout
  • Emitting output from custom output buffer handlers is deprecated
  • Returning non-string values from a user output handler is deprecated
  • Non-canonical scalar type casts (boolean|double|integer|binary) deprecated
  • All MHASH_* constants deprecated

https://blog.kjprotech.com/2025/11/php-850.html

Picture Source

php.net

創作者介紹
創作者 KJPro Technology 部落格 的頭像
KJPro Technology

KJPro Technology 部落格

KJPro Technology 發表在 痞客邦 留言(0) 人氣( 0 )