Php/docs/doc.changelog

来自菜鸟教程
跳转至:导航、​搜索

更新日志

对绑定的扩展的函数有以下更新。

Version Function Description
Since 5.0.0 get_parent_class The object parameter is optional if called

from the object's method.

Since 5.0 cal_info 参数calendar作为可选项,缺省时默认值为"所有历法"。
Since 4.3.0 easter_date year参数可选,缺省的默认值是当年。
  easter_days 引入参数 method。
  easter_days 参数year 可选,缺省默认值是当年。
Since 4.2.0 srand seed 成为可选,省略时会默认使用随机值。
Since 4.0.5 get_parent_class If object is a string, returns the name of the

parent class of the class with that name.

prior to 5.3.0 get_object_vars If the object isn't an object, then

get_object_vars would return false

Prior to 5.1.3 imagecolorallocatealpha Returns -1 if the allocation failed.
prior to 4.2.0 get_object_vars If the variables declared in the class of which the

object is an instance, have not been assigned a value, those will not be returned in the array

PHP 7.0.15, PHP 7.1.1 get_defined_functions 增加 exclude_disabled 参数。
PHP 5.3.2 (PECL OCI8 1.4) oci_set_prefetch Before this release, rows must be >= 1.
PHP 5.3 (PECL OCI8 1.3.4) oci_set_prefetch Before this release, prefetching was limited to the lesser

of rows rows and 1024

  • rows bytes. The byte size

restriction has now been removed.

PECL 3.0.0 IntlDateFormatter::format Support for providing IntlCalendar objects to the

value parameter was added.

Before 5.1.0 get_parent_class If called without parameter outside object, this function would have

returned null with a warning.

8.0.0, PECL OCI8 3.0.0 OCICollection::append The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::assign The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::assignElem The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::free The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::getElem The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::max The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::size The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCICollection::trim The OCI-Collection class was renamed to

OCICollection to align with PHP naming standards.

  OCILob::append The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::close The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::eof The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::erase The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::export The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::flush The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::free The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::getBuffering The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::import The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::load The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::read The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::rewind The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::save The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::saveFile The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::seek The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::setBuffering The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::size The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::tell The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::truncate The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::write The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::writeTemporary The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

  OCILob::writeToFile The OCI-Lob class was renamed to

OCILob to align with PHP naming standards.

8.0.0 bcpowmod scale is now nullable.
  com_event_sink sink_interface is nullable now.
  com_get_active_object codepage is nullable now.
  deflate_add context expects a DeflateContext

instance now; previously, a resource was expected.

  deflate_init On success, this function returns a DeflateContext instance now;

previously, a resource was returned.

  enchant_broker_describe Prior to this version, the function returned false on failure.
  enchant_broker_describe broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_dict_exists broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_free broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_free_dict dictionary expects a EnchantDictionary now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_get_dict_path broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_get_error broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_init On success, this function returns an EnchantBroker instance now;

previoulsy, a 资源(resource) was retured.

  enchant_broker_list_dicts broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_list_dicts Prior to this version, the function returned false on failure.
  enchant_broker_request_dict broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_request_dict On success, this function returns an EnchantDictionary instance now;

previoulsy, a 资源(resource) was retured.

  enchant_broker_request_pwl_dict broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_request_pwl_dict On success, this function returns an EnchantDictionary instance now;

previoulsy, a 资源(resource) was retured.

  enchant_broker_set_dict_path broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_broker_set_ordering broker expects an EnchantBroker instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_add_to_personal dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_add_to_session dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_check dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_describe dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_describe Prior to this version, the function returned false on failure.
  enchant_dict_get_error dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_is_in_session dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_quick_check dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_store_replacement dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  enchant_dict_suggest dictionary expects an EnchantDictionary instance now;

previoulsy, a 资源(resource) was expected.

  gzwrite length is nullable now; previously, the default was

0.

  html_entity_decode encoding is nullable now.
  iconv_strpos encoding is nullable now.
  iconv_strrpos encoding is nullable now.
  inflate_add context expects an InflateContext

instance now; previously, a resource was expected.

  inflate_get_read_len context expects an InflateContext

instance now; previously, a resource was expected.

  inflate_get_status context expects an InflateContext

instance now; previously, a resource was expected.

  inflate_init On success, this function returns an InflateContext instance now;

previously, a resource was returned.

  ldap_add controls is nullable now; previously, it defaulted to [].
  ldap_add_ext controls is nullable now; previously, it defaulted to [].
  ldap_bind_ext controls is nullable now; previously, it defaulted to [].
  ldap_compare controls is nullable now; previously, it defaulted to [].
  ldap_delete controls is nullable now; previously, it defaulted to [].
  ldap_delete_ext controls is nullable now; previously, it defaulted to [].
  ldap_exop_passwd controls is nullable now; previously, it defaulted to [].
  ldap_mod_add controls is nullable now; previously, it defaulted to [].
  ldap_mod_del controls is nullable now; previously, it defaulted to [].
  ldap_mod_replace controls is nullable now; previously, it defaulted to [].
  ldap_modify_batch controls is nullable now; previously, it defaulted to [].
  ldap_mod_add_ext controls is nullable now; previously, it defaulted to [].
  ldap_mod_del_ext controls is nullable now; previously, it defaulted to [].
  ldap_mod_replace_ext controls is nullable now; previously, it defaulted to [].
  ldap_rename controls is nullable now; previously, it defaulted to [].
  ldap_rename_ext controls is nullable now; previously, it defaulted to [].
  ldap_sasl_bind dn, password, mech,

realm, authc_id, authz_id and props are nullable now.

  ldap_set_rebind_proc callback is nullable now.
  libxml_use_internal_errors use_errors is nullable now. Previously, its default

was false.

  mb_regex_set_options If the parameter options is given, the previous

options are returned. Formerly, the current options have been returned.

  metaphone The function returned false on failure.
  mhash key is now nullable.
  msg_get_queue On success, this function returns a SysvMessageQueue instance now;

previously, a resource was returned.

  msg_receive queue expects a SysvMessageQueue

instance now; previously, a resource was expected.

  msg_remove_queue queue expects a SysvMessageQueue

instance now; previously, a resource was expected.

  msg_send queue expects a SysvMessageQueue

instance now; previously, a resource was expected.

  msg_set_queue queue expects a SysvMessageQueue

instance now; previously, a resource was expected.

  msg_stat_queue queue expects a SysvMessageQueue

instance now; previously, a resource was expected.

  sem_acquire semaphore expects a SysvSemaphore

instance now; previously, a resource was expected.

  sem_get On success, this function returns a SysvSemaphore instance now;

previously, a resource was returned.

  sem_get The type of auto_release has been changed from

int to bool.

  sem_release semaphore expects a SysvSemaphore

instance now; previously, a resource was expected.

  sem_remove semaphore expects a SysvSemaphore

instance now; previously, a resource was expected.

  shm_attach On success, this function returns an SysvSharedMemory instance now;

previously, a resource was returned.

  shm_attach size is nullable now.
  shm_detach shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shm_get_var shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shm_has_var shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shm_put_var shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shm_remove shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shm_remove_var shm expects a SysvSharedMemory

instance now; previously, a resource was expected.

  shmop_close shmop expects a Shmop

instance now; previously, a resource was expected.

  shmop_delete shmop expects a Shmop

instance now; previously, a resource was expected.

  shmop_open On success, this function returns an Shmop instance now;

previously, a resource was returned.

  shmop_read shmop expects a Shmop

instance now; previously, a resource was expected.

  shmop_size shmop expects a Shmop

instance now; previously, a resource was expected.

  shmop_write Prior to PHP 8.0.0, false was returned on failure.
  shmop_write shmop expects a Shmop

instance now; previously, a resource was expected.

  soundex Prior to this version, calling the function with an empty string returned false

for no particular reason.

  XMLWriter::endAttribute 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endCdata 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endComment 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endDocument 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endDtd 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endDtdAttlist 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endDtdElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endDtdEntity 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::endPi 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::flush 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::flush This function can no longer return false.
  XMLWriter::fullEndElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::openMemory This function returns now an XMLWriter instance on success.

Previouly, a 资源(resource) has been returned in this case.

  XMLWriter::openUri This function returns now an XMLWriter instance on success.

Previouly, a 资源(resource) has been returned in this case.

  XMLWriter::outputMemory 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::setIndent 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::setIndentString 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startAttribute 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startAttributeNs prefix is nullable now.
  XMLWriter::startAttributeNs 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startCdata 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startComment 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startDocument 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startDtd 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startDtdAttlist 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startDtdElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startDtdEntity 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startElementNs 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::startPi 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::text 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeAttribute 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeAttributeNs 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeCdata 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeComment 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeDtd 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeDtdAttlist 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeDtdElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeDtdEntity 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeDtdEntity publicId, systemId and

notationData are nullable now.

  XMLWriter::writeElement 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeElementNs 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writePi 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  XMLWriter::writeRaw 现在 writer 需要 XMLWriter 实例,

之前需要的是 resource。

  ReflectionParameter::getDefaultValue This method now allows getting the default value of parameters of built-in functions and

built-in class methods. Previously, a ReflectionException was thrown.

  ReflectionParameter::getDefaultValueConstantName This method now allows getting the default values' constant names of built-in functions and

built-in class methods. Previously, a ReflectionException was thrown.

  tidy::__construct filename, config,

encoding and useIncludePath are nullable now.

  tidy::parseFile config and encoding are nullable now.
  tidy::parseString config and encoding are nullable now.
  tidy::repairFile tidy::repairFile is a static method now.
  tidy::repairFile config and encoding are nullable now.
  tidy::repairString This function no longer accepts the useIncludePath parameter.
  tidy::repairString config and encoding are nullable now.
  tidy::repairString tidy::repairString is a static method now.
  XMLReader::getAttribute This function can no longer return false.
  XMLReader::getAttributeNs This function can no longer return false.
  XMLReader::lookupNamespace This function can no longer return false.
  XMLReader::next name is nullable now.
  XMLReader::open XMLReader::open is now declared as static method,

but can still be called on an XMLReader instance.

  XMLReader::XML XMLReader::XML is now declared as static method,

but can still be called on an XMLReader instance.

7.4.0 array_merge 允许不带参数调用,之前版本至少需要一个参数。
  array_merge_recursive 允许不传递参数调用,之前的版本中至少需要一个参数。
  gzread This functions returns false on failure now; previously 0 was returned.
  gzwrite This functions returns false on failure now; previously 0 was returned.
  hash_algos 支持 crc32c。
  idn_to_ascii The default value of variant is now

INTL_IDNA_VARIANT_UTS46 instead of the deprecated INTL_IDNA_VARIANT_2003.

  idn_to_utf8 The default value of variant is now

INTL_IDNA_VARIANT_UTS46 instead of the deprecated INTL_IDNA_VARIANT_2003.

  imagecropauto The default value of mode has been changed to

IMG_CROP_AUTO. Formerly, the default value has been -1 which corresponds to IMG_CROP_DEFAULT, but passing -1 is now deprecated.

  imagecropauto The behavior of imagecropauto() in the bundled libgd has been synced with

that of system libgd: IMG_CROP_DEFAULT no longer falls back to IMG_CROP_SIDES and threshold-cropping now uses the same algorithm as system libgd.

  implode 把参数 glue 放到 pieces 的后面已被废弃(就是不按文档中的顺序传递参数)。
  ldap_control_paged_result This function has been deprecated.
  ldap_control_paged_result_response This function has been deprecated.
  password_hash 现在 algo 参数可支持 string 类型,但为了向后兼容也支持

int 类型。

  password_needs_rehash 现在 algo 参数可以支持 string 类型,但为了向后兼容性,同时支持

int 类型。

  preg_replace_callback 新增 flags 参数。
  preg_replace_callback_array The flags parameter was added.
  SQLite3Stmt::bindParam sql_param now also supports the @param

notation.

  SQLite3Stmt::bindValue sql_param now also supports the @param

notation.

7.3.24, 7.4.12 tidyNode::isHtml This function has been fixed to have reasonable behavior. Previously,

almost any node was reported as being an HTML node.

7.3.14, 7.4.2 dba_open The lmdb driver now supports an additional $mapsize

parameter.

7.3.0 array_unshift 现在可以只用一个参数来调用,之前至少需要两个参数。
  compact 现在,如果字符串指向的变量未定义,compact 会产生 E_NOTICE 级错误。

在此之前,此类问题会静默忽略掉。

  define 废弃了 case_insensitive,并将在 8.0.0 版中移除。
  ftp_nb_fget 参数 mode 变为可选参数。

在之前的版本中,这是一个必填参数。

  ftp_nb_fput 参数 mode 变为可选参数。

在之前的版本中,这是一个必填参数。

  ftp_nb_get mode 参数变为可选,之前是强制性的。
  ftp_nb_put mode 参数为可选,之前版本中为必填。
  ftp_put mode 参数为可选,之前版本中为必选。
  is_countable is_countable has been added.
  json_decode JSON_THROW_ON_ERROR

options was added.

  json_encode options 参数新增

JSON_THROW_ON_ERROR 常量。

  list 支持在数组解构时传引用。
  password_hash 增加 PASSWORD_ARGON2ID,支持 Argon2id 密码算法。
  preg_quote 字符 # 被增加为需要转义的。
  session_set_cookie_params 增加 options 参数,

可以通过传入一个关联数组对各个选项进行设置。 同时,通过使用这个参数还可以对 SameSite cookie 进行设置。

  unlink 现在 Windows 也可以用 unlink 删除文件句柄还在使用中的文件了,在此之前是无法删除的。

然而,还是无法重新创建文件,需要等到所有句柄都关闭才可以。

  var_export Now exports stdClass objects as an array cast to

an object ((object) array( ... )), rather than using the nonexistent method stdClass::__setState. The practical effect is that now stdClass is exportable, and the resulting code will even work on earlier versions of PHP.

7.3 ldap_add Support for controls added
  ldap_compare Support for controls added
  ldap_delete Support for controls added
  ldap_exop Support for serverctrls added
  ldap_exop_passwd Support for controls added
  ldap_list Support for serverctrls added
  ldap_mod_add Support for controls added
  ldap_mod_del Support for controls added
  ldap_mod_replace Support for controls added
  ldap_modify_batch Support for controls added
  ldap_mod_add_ext Support for controls added
  ldap_mod_del_ext Support for controls added
  ldap_mod_replace_ext Support for controls added
  ldap_parse_result Support for controls added
  ldap_read Support for serverctrls added
  ldap_rename Support for controls added
  ldap_rename_ext Support for controls added
  ldap_search Support for serverctrls added
7.2.18, 7.3.5 substr_compare offset 现在可能等于 main_str。
7.2.0 count 当无效的 countable 类型传递给 array_or_countable 参数时,count 会产生警告。
  date_parse The zone element of the returned array represents

seconds instead of minutes now, and its sign is inverted. For instance -120 is now 7200.

  date_parse_from_format The zone element of the returned array represents

seconds instead of minutes now, and its sign is inverted. For instance -120 is now 7200.

  hash_copy 接受的参数以及返回值从资源类型修改为 HashContext 对象类型。
  hash_final 接收参数从资源类型修改为 HashContext 对象类型。
  hash_hmac 不再支持非加密的哈希函数(adler32,crc32,crc32b,fnv132,fnv1a32,fnv164,fnv1a64,joaat)。
  hash_hmac_file 不再支持非加密的哈希函数(adler32,crc32,crc32b,fnv132,fnv1a32,fnv164,fnv1a64,joaat)。
  hash_init 当使用 HASH_HMAC 选项的时候,不再支持非加密的哈希函数(adler32,crc32,crc32b,fnv132,fnv1a32,fnv164,fnv1a64,joaat)。
  hash_init 返回 HashContext 对象,不再返回资源类型。
  hash_pbkdf2 不再支持非加密的哈希函数(adler32,crc32,crc32b,fnv132,fnv1a32,fnv164,fnv1a64,joaat)。
  hash_update 接收参数从资源类型修改为 HashContext 对象类型。
  hash_update_file 接收参数从资源类型修改为 HashContext 对象类型。
  hash_update_stream 接收参数从资源类型修改为 HashContext 对象类型。
  idn_to_ascii INTL_IDNA_VARIANT_2003 has been deprecated; use

INTL_IDNA_VARIANT_UTS46 instead.

  idn_to_utf8 INTL_IDNA_VARIANT_2003 has been deprecated; use

INTL_IDNA_VARIANT_UTS46 instead.

  json_decode JSON_INVALID_UTF8_IGNORE, and

JSON_INVALID_UTF8_SUBSTITUTE options were added.

  json_encode options 参数新增

JSON_INVALID_UTF8_IGNORE 和 JSON_INVALID_UTF8_SUBSTITUTE 常量。

  mail 现在 additional_headers 参数开始支持 array。
  number_format number_format 现在无法返回 -0,之前可能返回 -0,因为 number 可能会是 -0.01。
  openssl_pkcs7_verify 新增 p7bfilename 参数。
  pack float 和 double 类型支持打断和小端。
  parse_str 不带第二个参数的情况下使用 parse_str 会产生

E_DEPRECATED 警告。

  password_hash 增加 PASSWORD_ARGON2I,支持 Argon2i 密码算法。
  preg_match 现在 $flags 参数支持 PREG_UNMATCHED_AS_NULL。
  preg_match_all 现在 $flags 参数可以支持 PREG_UNMATCHED_AS_NULL。
  proc_nice 在 Windows 平台上可用。
  session_abort The return type of this function is bool now.

Formerly, it has been void.

  session_module_name 不允许设置模块名称为 "user"。

在之前的版本中,如果设置为 "user",那么会被静默的忽略到。

  session_name session_name 函数会检查会话状态,

之前的版本仅仅检查 cookie 状态。 所以,旧版本的 PHP 允许你在调用 session_start 函数之后再调用 session_name 函数, 新版本的 PHP 不再允许这样做了。

  session_reset The return type of this function is bool now.

Formerly, it has been void.

  session_set_cookie_params 成功时返回 true, 或者在失败时返回 false。 之前版本中是返回 void 的。
  session_write_close The return type of this function is bool now.

Formerly, it has been void.

  unpack float and double types supports both Big Endian and Little Endian.
  SQLite3::openBlob The flags parameter has been added, allowing to

write BLOBs; formerly only reading was supported.

7.1.5 IntlDateFormatter::format Support for providing general DateTimeInterface objects to the

value parameter was added. Formerly, only proper DateTime objects were supported.

7.1.4 PDO::sqliteCreateFunction The flags parameter has been added.
  SQLite3::createFunction The flags parameter has been added.
7.1.0 DateInterval::format The F and f format

characters were added.

  DateTime::setTime 新增 microsecond 参数。
  array_rand 内置的随机数生成算法从 libc rand 函数改成梅森旋转 伪随机数生成算法。
  getenv 现在可以省略 varname 来检索所有环境变量的关联数组 array。
  getopt 添加 optind 参数。
  grapheme_extract Support for negative starts has been added.
  grapheme_stripos Support for negative offsets has been added.
  grapheme_strpos Support for negative offsets has been added.
  hash_algos 加入 sha512/224,sha512/256,sha3-224,sha3-256,sha3-384 以及

sha3-512 算法的支持。

  iconv_strpos Support for negative offsets has been added.
  json_decode An empty JSON key ("") can be encoded to the empty object property

instead of using a key with value _empty_.

  json_encode options 参数新增

JSON_UNESCAPED_LINE_TERMINATORS 常量。

  json_encode 对 Double 的值进行编码时,使用

serialize_precision 代替 precision。

  list 现在可以指定 list 中的键。

这就可以解构非数字键或者无顺序的数组。

  long2ip 参数 proper_address 的类型从 string 改成 integer。
  mb_ereg mb_ereg will now set regs to

an empty array, if nothing matched. Formerly, regs was not modified in that case.

  mb_ereg_replace The e modifier has been deprecated.
  mb_ereg_search_setpos Support for negative positions has been added.
  mb_eregi mb_eregi will now set regs to

an empty array, if nothing matched. Formerly, regs was not modified in that case.

  mb_eregi_replace The e modifier has been deprecated.
  mb_strimwidth 支持负数的 start 和 width。
  mb_stripos 支持 offset 使用负数。
  mb_strpos 支持负数的 offset。
  openssl_decrypt 添加了 tag 和 aad 参数。
  openssl_encrypt 增加了 tag、aad、tag_length 参数
  openssl_pkey_new 添加了 curve_name 配置参数使得可以创建 EC 密钥。
  session_start 当 session_start 执行失败,

无法开始一个会话的时候,会返回 false, 并且不会初始化超级变量 $_SESSION。

  shuffle 内置的随机数产生算法从 libc rand 函数改成 梅森旋转伪随机数生成算法。
  str_shuffle 内置的随机算法从 libc rand 函数改成了梅森旋转演伪随机数发生算法。
  stripos 开始支持负数的 offset。
  strpos 开始支持负数的 offset。
  substr_count 开始支持负数的 offset 和 length。
  unpack The optional offset has been added.
  ReflectionType::__toString ReflectionType::__toString has been deprecated.
  SessionHandler::gc Prior to this version, the function returned true on success.
  SessionHandlerInterface::gc Prior to this version, the function returned true on success.
7.1 DateTime::__construct 微秒部分不再是 '00000' 了,而是真实的微秒数据。
7.0.15,7.1.1 pack 添加了 “e”,“E”,“g” 和 “G” 代码以启用 float 和 double 的字节顺序支持。
7.0.11 iconv_substr 如果 str 等长于

offset 个字符, 将返回空字符串。之前的版本里,这种情况是会返回 false 的。

7.0.10 SQLite3::__construct The filename can now be empty to use a private,

temporary on-disk database.

7.0.7 curl_setopt 引入 CURL_HTTP_VERSION_2、 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE、

CURL_HTTP_VERSION_2TLS、 CURL_REDIR_POST_301、 CURL_REDIR_POST_302、 CURL_REDIR_POST_303、 CURL_REDIR_POST_ALL、 CURL_VERSION_KERBEROS5、 CURL_VERSION_PSL、 CURL_VERSION_UNIX_SOCKETS、 CURLAUTH_NEGOTIATE、 CURLAUTH_NTLM_WB、 CURLFTP_CREATE_DIR、 CURLFTP_CREATE_DIR_NONE、 CURLFTP_CREATE_DIR_RETRY、 CURLHEADER_SEPARATE、 CURLHEADER_UNIFIED、 CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE、 CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE、 CURLMOPT_MAX_HOST_CONNECTIONS、 CURLMOPT_MAX_PIPELINE_LENGTH、 CURLMOPT_MAX_TOTAL_CONNECTIONS、 CURLOPT_CONNECT_TO、 CURLOPT_DEFAULT_PROTOCOL、 CURLOPT_DNS_INTERFACE、 CURLOPT_DNS_LOCAL_IP4、 CURLOPT_DNS_LOCAL_IP6、 CURLOPT_EXPECT_100_TIMEOUT_MS、 CURLOPT_HEADEROPT、 CURLOPT_LOGIN_OPTIONS、 CURLOPT_PATH_AS_IS、 CURLOPT_PINNEDPUBLICKEY、 CURLOPT_PIPEWAIT、 CURLOPT_PROXY_SERVICE_NAME、 CURLOPT_PROXYHEADER、 CURLOPT_SASL_IR、 CURLOPT_SERVICE_NAME、 CURLOPT_SSL_ENABLE_ALPN、 CURLOPT_SSL_ENABLE_NPN、 CURLOPT_SSL_FALSESTART、 CURLOPT_SSL_VERIFYSTATUS、 CURLOPT_STREAM_WEIGHT、 CURLOPT_TCP_FASTOPEN、 CURLOPT_TFTP_NO_OPTIONS、 CURLOPT_UNIX_SOCKET_PATH、 CURLOPT_XOAUTH2_BEARER、 CURLPROTO_SMB、 CURLPROTO_SMBS、 CURLPROXY_HTTP_1_0、 CURLSSH_AUTH_AGENT 和 CURLSSLOPT_NO_REVOKE。

7.0.0 array_column input 参数现在可以是包含对象的数组。
  assert assert is now a language construct and not a

function. assertion can now be an expression. The second parameter is now interpreted either as an exception (if a Throwable object is given), or as the description supported from PHP 5.4.8 onwards.

  define 允许 array 的值。
  dirname 添加可选的 levels 参数。
  getrusage 此函数现在开始支持 Windows。
  json_decode An empty PHP string or value that after casting to string is an empty

string (NULL, FALSE) results in JSON syntax error.

  json_decode Rejected RFC 7159 incompatible number formats - top level

(07, 0xff, .1, -.1) and all levels ([1.], [1.e1])

  key array 现在总是会传值。

在此之前,它会尽可能传引用,否则就传值。

  list 赋值操作的顺序发生了变化。
  list 字符串无法再被拆包(unpack)。
  list list 表达式不再可以完全为空。
  mktime is_dst参数已经被移除。
  openssl_open 添加了 iv 参数
  openssl_seal 添加 iv 变量。
  session_set_save_handler 新增可选参数 validate_sid 和

update_timestamp。

  session_start 新加 options 参数。
  substr 如果 string 的字符串长度与

start 相同时将返回一个空字符串。在之前的版本中,这种情况将返回 false 。

  IntlDateFormatter::setTimeZoneId This function has been removed.
5.6.5 crypt When the failure string "*0" is given as the

salt, "*1" will now be returned for consistency with other crypt implementations. Prior to this version, PHP 5.6 would incorrectly return a DES hash.

5.6.3 pack 添加了 “q”、“q”、“J” 和 “P” 代码以支持处理 64 位数字。
5.6.0 array_fill num 现在可以是零。

之前 num 必须大于零。

  array_filter 添加可选的参数 flag,以及常量

ARRAY_FILTER_USE_KEY 和 ARRAY_FILTER_USE_BOTH。

  crypt Raise E_NOTICE security warning if salt is omitted.
  htmlentities The default value for the encoding parameter was

changed to be the value of the default_charset configuration option.

  htmlspecialchars The default value for the encoding parameter was

changed to be the value of the default_charset configuration option.

  json_decode Invalid non-lowercased variants of the true,

false and null literals are no longer accepted as valid input, and will generate warnings.

  mb_regex_encoding Default encoding is changed to UTF-8. It was EUC-JP Previously.
  mcrypt_create_iv source 参数的默认值是

MCRYPT_DEV_URANDOM。

  mcrypt_decrypt 不再接受无效长度的 key and iv 参数。

如果参数长度无效,则 mcrypt_decrypt 函数会产生警告并且返回 false。 之前版本中,对于长度不足的密钥和初始向量会在其后补齐 '\0' 使其达到有效长度。

  mcrypt_encrypt 不再接受无效长度的 key and iv 参数。

如果参数长度无效,则 mcrypt_decrypt 函数会产生警告并且返回 false。 之前版本中,对于长度不足的密钥和初始向量会在其后补齐 '\0' 使其达到有效长度。

  pg_lo_truncate Added truncate function. It supports PostgreSQL 9.3's 64bit large object. Both client and server must

support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object.

  stream_socket_enable_crypto Introduce STREAM_CRYPTO_METHOD_ANY_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT, STREAM_CRYPTO_METHOD_ANY_SERVER, STREAM_CRYPTO_METHOD_TLSv1_0_SERVER, STREAM_CRYPTO_METHOD_TLSv1_1_SERVER, STREAM_CRYPTO_METHOD_TLSv1_2_SERVER.
  stream_socket_enable_crypto The crypto_type is now optional.
  ReflectionClass::newInstanceWithoutConstructor All internal classes can now be instantiated except for those declared

final.

  XMLReader::getAttributeNo XMLReader::getAttributeNo now returns null

if the attribute doesn't exist.

  XMLReader::getAttributeNs XMLReader::getAttributeNS now returns null

if the attribute doesn't exist.

5.5.38, 5.6.24, 7.0.9 getenv 添加 local_only 参数。
5.5.21 crypt When the failure string "*0" is given as the

salt, "*1" will now be returned for consistency with other crypt implementations. Prior to this version, PHP 5.5 (and earlier branches) would incorrectly return a DES hash.

5.5.8 DatePeriod::__construct end type changed to

DateTimeInterface. Previously, DateTime.

5.5.7 apache_request_headers 此函数可用于 CLI server。
  apache_response_headers 此函数可用于 CLI server.
  getallheaders 此函数可用于 CLI server。
5.5.2 DOMDocument::schemaValidate Added the flags parameter
  DOMDocument::schemaValidateSource Added the flags parameter
5.5.1 hex2bin 如果输入的字符串是无效的十六进制字符串则抛出一个警告,
  session_set_save_handler 新增可选参数 create_sid。
5.5.0/PECL 3.0.0 IntlDateFormatter::create An IntlCalendar object is allowed for

calendar. Objects of type IntlTimeZone and DateTimeZone are allowed for timezone. Invalid timezone identifiers (including empty strings) are no longer allowed for timezone. If null is given for timezone, the timezone identifier given by date_default_timezone_get will be used instead of ICUʼs default.

  IntlDateFormatter::setCalendar It became possible to pass an IntlCalendar

object.

5.5.0 DatePeriod::__construct start type changed to

DateTimeInterface. Previously, DateTime.

  empty empty 现在支持表达式了,而不仅仅是变量。
  ip2long Prior to this version, on Windows ip2long would sometimes return

a valid number even if passed a value which was not an (IPv4) Internet Protocol dotted address.

  pack “Z” 代码添加了与 “a” 等效的功能,以实现 Perl

兼容性。

  setcookie 发送给客户端的 Set-Cookie 头现在会包含 Max-Age 属性。
  setrawcookie 发送给客户端的 Set-Cookie 头现在会加上 Max-Age 属性。
  unpack Changes were made to bring this function into line with Perl:

The "a" code now retains trailing NULL bytes. The "A" code now strips all trailing ASCII whitespace (spaces, tabs, newlines, carriage returns, and NULL bytes). The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes.

  IntlDateFormatter::setTimeZoneId This function has been deprecated.
5.4.43, 5.5.27, 5.6.11 escapeshellcmd 感叹号会被空格所替换。
5.4.32, 5.5.16 ucwords 增加了 delimiters 参数。
5.4.8 assert 增加了参数 description。

description 现在也作为第四个参数提供给 ASSERT_CALLBACK 模式里的回调函数。

  mb_strcut Passing NULL as length

extracts all bytes to the end of the string. Prior to this version NULL was treated the same as 0.

  mb_substr length 传入 NULL,则从 start 提取到字符串的结尾处。

在之前的版本里, NULL 会被当作 0 来处理。

5.4.7 parse_url 修复了 host 在 协议 省略时的识别。
5.4.4 hex2bin 如果输入的字符串有多余将抛出异常。 PHP 5.4.0 起字符串将被静默地接受,但是最后的字节会被截断。
5.4.0 apache_child_terminate 该函数目前也可以用于FastCGI模式了。以前,它仅在PHP作为Apapche的模块安装时支持。
  apache_request_headers 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。
  apache_response_headers 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。
  array_combine (修复)早期版本中如果是空数组就报E_WARNING的错并且返回false。
  array_multisort array1_sort_flags 增加 SORT_NATURAL 和 SORT_FLAG_CASE 选项。
  date_default_timezone_get 不再使用 TZ 来推测时区。
  date_default_timezone_get 不再根据操作系统的信息来推测时区,因为这是不可靠的。
  define_syslog_variables This function was removed from PHP.
  dns_get_record 增加了参数raw。
  empty 检查非数字的字符串偏移量会返回 true.
  filter_input_array 添加 add_empty 参数.
  filter_var_array 添加 add_empty 参数。
  get_html_translation_table The constants ENT_HTML401, ENT_XML1,

ENT_XHTML and ENT_HTML5 were added.

  get_html_translation_table The default value for the encoding parameter was

changed to UTF-8.

  get_magic_quotes_gpc 始终返回 false,因为这个魔术引号功能已经从 PHP 中移除了。
  get_magic_quotes_runtime 总是返回 false,因为魔术引号(magic quotes)功能已经从 PHP 中移除。
  getallheaders 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。
  htmlentities encoding 参数的默认值改成 UTF-8。
  htmlentities 增加常量 ENT_SUBSTITUTE、 ENT_DISALLOWED、

ENT_HTML401、 ENT_XML1、 ENT_XHTML、 ENT_HTML5。

  htmlspecialchars encoding 参数的默认值改成 UTF-8。
  htmlspecialchars 增加常量 ENT_SUBSTITUTE、 ENT_DISALLOWED、

ENT_HTML401、 ENT_XML1、 ENT_XHTML、 ENT_HTML5。

  htmlspecialchars_decode 增加了 ENT_HTML401、ENT_XML1、

ENT_XHTML 和 ENT_HTML5 等常量。

  http_build_query 加入了 enc_type 参数。
  iconv 这个版本起,字符非法时候会返回 false,除非在输出字符里指定了 //IGNORE 。

在之前版本,它会返回一部分字符串。

  imagewebp 支持把 resource 流作为

to 参数传入。

  isset 检查字符的非数字偏移量将会返回 false。
  json_decode The options parameter was added.
  json_decode JSON_BIGINT_AS_STRING, and

JSON_OBJECT_AS_ARRAY options were added.

  number_format This function now supports multiple bytes in

dec_point and thousands_sep. Only the first byte of each separator was used in older versions.

  openssl_decrypt 将 raw_output 更改至 options。
  openssl_encrypt raw_output 改到 options。
  scandir sorting_order now accepts constants. Any

nonzero value caused descending order in previous versions.

  session_set_save_handler 新增用来实现自定义会话处理器的接口 SessionHandlerInterface;

新增 PHP 内部会话处理器类:SessionHandler。

5.3.15, 5.4.5 Collator::getSortKey Sort keys do no longer contain any NUL bytes.
5.3.9 DateTime::createFromFormat 新增 format 格式字符串中对于 + 格式字符的支持。
5.3.7 crypt Added $2x$ and $2y$ Blowfish

modes to deal with potential high-bit attacks.

5.3.6 array_product 空数组现在会产生 1,而之前此函数处理空数组会产生 0。
5.3.4 get_html_translation_table The encoding parameter was added.
  rawurlencode 因为 rawurlencode 使用了 EBCDIC,所以波浪线字符不会再被编码。
  strip_tags strip_tags ignores self-closing XHTML

tags in allowable_tags.

5.3.3 openssl_decrypt 添加 iv 参数。
  openssl_encrypt 增加 iv 参数。
  parse_url 在 URL 解析失败时将不会产生 E_WARNING 级别的错误。
5.3.2 crypt 基于 Ulrich Drepper 的实现,新增基于 SHA-256 算法和 SHA-512 算法的 crypt。
  crypt 修正了 Blowfish 算法由于非法循环导致的问题,返回“失败”字符串(“*0” 或 “*1”)而不是转而使用 DES 算法。
  flock 在文件资源句柄关闭时不再自动解锁。现在要解锁必须手动进行。
5.3.1 get_defined_constants 仅作用于 Windows:内核常量归类到 Core,之前是 mhash。
5.3.0 起 get_class object 默认参数现在是 null ,所以,现在传入 null 到 object 参数时,和没传参数的结果一样。
5.3.0 DateTime::__construct 如果 time 参数不是一个有效的

日期/时间格式, 会抛出异常。 在之前的版本中是会发出一个错误。

  DateTimeZone::listIdentifiers 添加可选的 what 和

country 参数。

  acosh This function is now available on all platforms
  array_multisort array1_sort_flags 增加选项 SORT_LOCALE_STRING。
  array_search As with all internal PHP functions as of 5.3.0,

array_search returns null if invalid parameters are passed to it.

  asinh 此函数在所有平台上均可用
  atanh 此函数在所有平台上都可以用了
  call_user_func 对面向对象里面的关键字的解析有所增强。在此之前,使用两个冒号来连接一个类和里面的一个方法,把它作为参数来作为回调函数的话,将会发出一个E_STRICT的警告,因为这个传入的参数被视为静态方法。
  call_user_func_array 对面向对象里面的关键字的解析有所增强。在此之前,使用两个冒号来连接一个类和里面的一个方法,把它作为参数来作为回调函数的话,将会发出一个E_STRICT的警告,因为这个传入的参数被视为静态方法。
  checkdnsrr 这个函数在Windows平台上也可以使用了。
  clearstatcache 增加了可选的 clear_realpath_cache

和 filename 参数.

  crypt PHP 现在包含了它自己的 MD5 Crypt 实现,包括标准 DES 算法,扩展的 DES 算法以及 Blowfish 算法。如果系统缺乏相应的实现,那么 PHP 将使用它自己的实现。
  date_default_timezone_set 现在会抛出 E_WARNING 而不是

E_STRICT。

  define_syslog_variables This function now throws an E_DEPRECATED notice.
  dns_get_record 在此版本之前,如果给参数authns传入值,则必须同时传入addtl的值。
  dns_get_record 可以是在windows平台上使用这个函数了。
  expm1 此函数在所有平台上均可用
  fgetcsv 增加了 escape 参数。
  fnmatch 此函数开始在 Windows 平台上生效。
  func_get_arg 该函数可以在参数列表中使用。
  func_get_arg If this function is called from the outermost scope of a file

which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns false. (不知道如何翻译跟好,直接参考例2即可明白)

  func_get_args 该函数可以在参数列表中使用。
  func_get_args If this function is called from the outermost scope of a file

which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns false. (不知道如何翻译跟好,直接参考例2即可明白)

  func_num_args If this function is called from the outermost scope of a file

which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns -1.

  func_num_args This function can now be used in parameter lists.
  get_cfg_var get_cfg_var 被修复,能够返回 "array" 的 ini 选项。
  get_defined_constants 内核常量归类为 Core,之前是 internal。在 Windows 上,内核常量归类到 mhash。
  get_object_vars This function now returns NULL if the

object isn't an object.

  getimagesize Added icon support.
  getmxrr Windows 平台上也能用这个函数了。
  getopt 此函数不再依赖于操作系统,现在也能够在 Windows 上运行。
  getopt 增加了可选值的支持(用"::"指定)。
  getopt 参数 longopts 在所有系统平台上均可用。
  getopt 支持 "=" 作为 参数和值的分隔符。
  htmlentities 增加常量 ENT_IGNORE。
  htmlspecialchars 增加常量 ENT_IGNORE。
  imagecolorclosesthwb 在 Windows 平台上可用
  imagefilter Pixelation support (IMG_FILTER_PIXELATE) was added.
  ini_get 当配置项不存在,之前会返回空字符串,现在会返回 false。
  ini_get_all 增加参数 details。
  json_decode Added the optional depth. The default

recursion depth was increased from 128 to 512

  link 该功能在 Windows 平台下开始有效(Vista、 Server 2008 或更高版本)。
  linkinfo Windows 平台上开始可用(Vista、Server 2008 或更高版本)。
  log1p 此函数在所有平台上均可用
  mb_get_info 条目 "http_output_conv_mimetypes" 开始有效。
  mcrypt_create_iv MCRYPT_DEV_RANDOM 和

MCRYPT_DEV_URANDOM 在 Windows 平台也可用了。

  mcrypt_create_iv 不再需要提前调用 srand 函数,

由本函数自动完成调用。

  mktime mktime now throws E_DEPRECATED notice

if the is_dst parameter is used.

  nl2br 新增可选的 is_xhtml 参数。在此之前,总是插入 '<br />'。
  openssl_open 添加了 method 参数
  openssl_seal 添加 method 变量。
  property_exists This function checks the existence of a property independent of

accessibility.

  rawurlencode 现在符合了RFC 3986。
  readlink 此函数在 Windows 平台下可用(Vista、Server

2008 或更高版本)。

  realpath 在之前的版本中,在 *BSD

系统上,如果仅仅是 path 不存在的话,realpath 并不会像其它系统那样返回 false。

  register_tick_function Ticks are now supported on threaded web server modules.
  round 引入了 mode 参数
  session_start 如果函数调用失败返回 false,

之前版本返回了 true。

  setlocale This function now throws an E_DEPRECATED notice if a string is passed

to the category parameter instead of one of the LC_* constants.

  stream_context_create 增加了可选参数 params 。
  stream_socket_pair 这个函数在windows平台不可用
  stristr 新增可选的 before_needle 参数。
  strlen Prior versions treated arrays as the string Array, thus returning

a string length of 5 and emitting an E_NOTICE level error.

  strstr 新增可选的 before_needle 参数。
  symlink 此函数在 Windows 平台上可用(Vista、Server

2008 或更高版本)。

  time_nanosleep 至此之后该函数在Windows平台下可用。
  time_sleep_until 自此,函数在Windows平台可用。
5.2.11 get_defined_constants categorize 参数现在可以合适得被处理。

在此之前,categorize 被解释为 !is_null($categorize),导致任何非 null 的值会强制常量分类。

5.2.10 array_rand The resulting array of keys is no longer shuffled.
  array_unique 修改回 sort_flags 的默认值为

SORT_STRING。

  ip2long 再此之前的版本, ip2long 有时会返回即使这不是一个IPV4的标准地址的数字地址。
  natsort 用零填充的数字字符串 (例如 '00005')现在本质上会忽略掉填充的前道零。
5.2.9 array_unique 增加可选选项sort_flags,默认值 SORT_REGULAR。

5.2.9 之前,此函数内部使用 SORT_STRING 排序。

5.2.7 round round 的内部运作修改符合 C99 的标准。
5.2.6 fopen 增加了选项 'c' 和 'c+'
5.2.5 addcslashes The escape sequences \v and \f were added.
  imagefilter Alpha support for IMG_FILTER_COLORIZE was added.
5.2.4 checkdnsrr 增加了TXT的记录类型。
  stream_wrapper_register 添加 flags 参数.
5.2.3 getimagesize Read errors generated by this function downgraded to

E_NOTICE from E_WARNING.

  htmlentities 增加参数 double_encode。
  htmlspecialchars 增加参数 double_encode。
  json_decode The nesting limit was increased from 20 to 128
  PDOStatement::getColumnMeta table 字段
5.2.2 - 5.2.6 substr If the start parameter indicates the position of

a negative truncation or beyond, false is returned. Other versions get the string from start.

5.2.2 ftp_ssl_connect 以前版本中,如果无法使用 SSL 连接,将会返回一个非 SSL 的连接,

在 5.2.2 版本中修改为返回 false

  phpinfo 增加了“已加载的配置文件”信息,之前只存在“配置文件路径(php.ini)"。
  proc_terminate 之前的版本被用来销毁进程

resource。

  token_get_all Line numbers are returned in element 2
5.2.1 json_decode Added support for JSON decoding of basic types.
  memory_get_peak_usage 使用此函数无需在编译时加上 --enable-memory-limit 选项。
  memory_get_usage 不需要在编译时使用 --enable-memory-limit 选项就能够使用这个函数。
  mt_srand The Mersenne Twister implementation in PHP now uses a new seeding

algorithm by Richard Wagner. Identical seeds no longer produce the same sequence of values they did in previous versions. This behavior is not expected to change again, but it is considered unsafe to rely upon it nonetheless.

  proc_open 为 other_options 参数增加 bypass_shell 选项。
5.2.0 base64_decode 增加了 strict 。
  curl_multi_info_read msgs_in_queue被加入。
  imagettftext It is now possible to specify an hexadecimal entity in

text.

  mb_strrpos 增加了可选参数 offset。
  memory_get_peak_usage 添加参数 real_usage。
  memory_get_usage 增加了参数 real_usage。
  openssl_verify 添加了 signature_alg 参数。
  pathinfo 添加了常量 PATHINFO_FILENAME。
  session_get_cookie_params 在返回数组中加入 “httponly”。
  session_set_cookie_params 加入 httponly 参数。
  setcookie 添加 httponly 参数。
  setrawcookie 增加了 httponly 参数。
  simplexml_load_file The optional parameter is_prefix was added.
  simplexml_load_string The optional parameter is_prefix was added.
  PDOStatement::execute input_parameters 中的键名必须和 SQL 中声明的相匹配。PHP 5.2.0 之前默认忽略。
  SimpleXMLElement::attributes The optional parameter is_prefix was added.
  SimpleXMLElement::__construct Added the ns and is_prefix parameters.
5.1.3 curl_getinfo 引入CURLINFO_HEADER_OUT.
  get_headers 自 PHP 5.1.3 起本函数使用默认的流上下文,其可以用 stream_context_get_default

函数设定和修改。

  http_build_query 方括号也会被转义。
  mb_get_info 实体 "mail_charset"、"mail_header_encoding" 和 "mail_body_encoding" 开始有效。
5.1.2 date_default_timezone_set 本版本开始验证 timezone_identifier 参数。
  http_build_query 加入了参数 arg_separator。
  parse_url 增加了参数 component。
  SimpleXMLElement::__construct Added the options and data_is_url parameters.
5.1.1 date format 参数标准的可用日期/时间格式常量见: 常量
5.1.0 ctype_digit 在 PHP 5.1.0 之前,当 text 是一个空字符串的时候,该函数将返回 true 。
  date 现在发布 E_STRICT 和 E_NOTICE

时区错误。

  date 时间戳的有效取值范围为 GMT 时间的 1901 年 12 月 13 日至 GMT 时间的 2038 年 1 月 19 日。

(32 位有符号整数的取值范围)。 但是,在 PHP 5.1.0 之前的版本,在某些系统(例如 Windows)上有效取值范围为 1970 年 1 月 1 日至 2038 年 1 月 19 日。

  date_sunrise 现在发布 E_STRICT 和 E_NOTICE

时区错误。

  date_sunset 现在发布 E_STRICT 和 E_NOTICE

时区错误。

  explode 支持负数的 limit
  file_get_contents Added the offset and

maxlen parameters.

  file_put_contents 添加了对 LOCK_EX 的支持和 data

参数处理 stream 资源的功能。

  gettimeofday 增加了参数 return_float。
  imagerotate 新增: ignore_transparent 。
  localtime 现在发布 E_STRICT 和 E_NOTICE

时区错误。

  md5_file 函数改用流 API。这意味着能够配合封装器使用该函数,比如 md5_file('http://example.com/..')。
  mktime When called with no arguments, mktime throws

E_STRICT notice. Use the time function instead.

  mktime 现在发布 E_STRICT 和 E_NOTICE

时区错误。

  mktime is_dst 参数被废弃。出错时函数返回

false 而不再是 -1。修正了本函数可以接受年月日参数全为零。

  stream_get_contents 增加参数 offset 。
  strftime 现在发布 E_STRICT 和 E_NOTICE

时区错误。

5.0.0 apache_get_modules 可用于Apache 1或PHP Apache 2

filter API。 在此之前, 只可用于 Apache 2 handler API。

  apache_get_version 可用于 Apache 2 filter API.
  checkdnsrr 增加了AAAA的记录类型。
  fgetss 参数 length 从 此开始可选。
  file 增加了参数 context
  file Prior to PHP 5.0.0 the flags parameter only

covered include_path and was enabled with 1

  file_get_contents Added context support.
  file_put_contents Added context support
  is_executable is_executable 开始可用以于 Windows。
  jdtojewish 增加了参数 fl。
  opendir path 支持 ftp://

URL wrapper

  realpath 在此之前的版本中,如果 path 传入了空或者

null,将导致 realpath 返回脚本当前的目录。

  socket_create 增加 AF_INET6 支持。
  strip_tags strip_tags 变为二进制安全的。
  strrpos 参数 needle 可以是一个多字符的字符串。
  strrpos 引入 offset 参数。