变更的函数
PHP 核心
- 使用
NULL
作为参数调用 set_error_handler() 将重置错误处理程序。 - 当使用
NULL
调用set_error_handler() 和 set_exception_handler() 时, 现在分别返回上一个错误或异常处理程序。 - pack() 和 unpack() 使用 “a”和“A”格式代码时的行为有所变化。 Detailed notes on these changes are available.
intl
- MessageFormatter::format() 及其相关函数现在 related functions now accept named arguments and mixed numeric and named arguments when PHP is linked to ICU 4.8 or later.
- MessageFormatter::format() and related functions no longer error when an insufficient number of arguments have been provided. Instead, the placeholders will not be substituted.
- MessageFormatter::format() and MessageFormatter::parse() are no longer limited to second precision when dealing with times.
- IntlDateFormatter::__construct() and datefmt_create() now accept IntlTimeZone and DateTimeZone objects for the
timezone
argument, and IntlCalendar objects for thecalendar
argument. Furthermore, if the time zone is omitted and thecalendar
doesn't specify a time zone, PHP's default time zone from date_default_timezone_get() is now used instead of the default ICU time zone. - IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false if the IntlDateFormatter object was created with an IntlCalendar instance instead of one of the IntlDateFormatter constants.
- 除 IntlDateFormatter 常量之外,IntlDateFormatter::setCalendar() 和 datefmt_set_calendar()现在接受 IntlCalendar 对象。
- IntlDateFormatter::format() 和 datefmt_format() 现在接受 IntlCalendar 对象。