Migration55/changed-functions-Phpdoc专题

变更的函数

PHP 核心

  • 使用 null 作为参数调用 <span class="function">set_error_handler 将重置错误处理程序。
  • 当使用 null 调用<span class="function">set_error_handler 和 <span class="function">set_exception_handler 时, 现在分别返回上一个错误或异常处理程序。
  • pack 和 <span class="function">unpack 使用 “a”和“A”格式代码时的行为有所变化。 Detailed notes on these changes are available.

intl

  • <span class="methodname">MessageFormatter::format 及其相关函数现在 related functions now accept named arguments and mixed numeric and named arguments when PHP is linked to ICU 4.8 or later.
  • <span class="methodname">MessageFormatter::format and related functions no longer error when an insufficient number of arguments have been provided. Instead, the placeholders will not be substituted.
  • <span class="methodname">MessageFormatter::format and <span class="methodname">MessageFormatter::parse are no longer limited to second precision when dealing with times.
  • <span class="methodname">IntlDateFormatter::__construct and <span class="function">datefmt_create now accept <span class="classname">IntlTimeZone and <span class="classname">DateTimeZone objects for the timezone argument, and IntlCalendar objects for the calendar argument. Furthermore, if the time zone is omitted and the calendar doesn't specify a time zone, PHP's default time zone from <span class="function">date_default_timezone_get is now used instead of the default ICU time zone.
  • <span class="methodname">IntlDateFormatter::getCalendar and <span class="function">datefmt_get_calendar return false if the IntlDateFormatter object was created with an IntlCalendar instance instead of one of the IntlDateFormatter constants.
  • 除 <span class="classname">IntlDateFormatter 常量之外, <span class="methodname">IntlDateFormatter::setCalendar 和 <span class="function">datefmt_set_calendar现在接受 <span class="classname">IntlCalendar 对象。
  • <span class="methodname">IntlDateFormatter::format 和 <span class="function">datefmt_format 现在接受 <span class="classname">IntlCalendar 对象。

本站为非盈利网站,作品由网友提供上传,如无意中有侵犯您的版权,请联系删除