附录
PHP Manual

Changelog

The following changes have been made to functions of bundled extensions.

VersionFunctionDescription
Since 5.3.0get_classNULL became the default value for object, so passing NULL to object now has the same result as not passing any value.
Since 5.0.0get_classThe object parameter is optional if called from the object's method.
 get_classThe class name is returned in its original notation.
 get_parent_classThe object parameter is optional if called from the object's method.
Since 4.2.0srandseed 成为可选,省略时会默认使用随机值。
Since 4.0.5get_parent_classIf object is a string, returns the name of the parent class of the class with that name.
prior to 5.3.0get_object_varsIf the object isn't an object, then get_object_vars would return FALSE
Prior to 5.1.3imagecolorallocatealphaReturns -1 if the allocation failed.
Prior to 4.2.0get_class_varsUninitialized class variables will not be reported by get_class_vars
prior to 4.2.0get_object_varsIf 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 5.3.2 (PECL OCI8 1.4)oci_set_prefetchBefore this release, rows must be >= 1.
PHP 5.3 (PECL OCI8 1.3.4)oci_set_prefetchBefore this release, prefetching was limited to the lesser of rows rows and 1024 * rows bytes. The byte size restriction has now been removed.
Before 5.1.0get_parent_classIf called without parameter outside object, this function would have returned NULL with a warning.
5.4.7parse_url修复了 host 在 协议 省略时的识别。
5.4.0apache_child_terminate该函数目前也可以用于FastCGI模式了。以前,它仅在PHP作为Apapche的模块安装时支持。
 apache_request_headersThis function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module.
 apache_response_headersThis function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module.
 date_default_timezone_get不再根据操作系统的信息来推测时区,因为这是不可靠的。
 date_default_timezone_get不再使用 TZ 来推测时区。
 emptyChecking non-numeric offsets of strings returns TRUE.
 getallheadersThis function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module.
 gzencodeFORCE_DEFLATE now generates RFC 1950 compliant output.
 http_build_query加入了 enc_type 参数。
 isset检查字符的非数字偏移量将会返回 FALSE。
 json_decodeThe options parameter was added.
 json_encodeoptions 参数增加常量: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, 和 JSON_UNESCAPED_UNICODE。
 mb_encode_numericentityAdded is_hex parameter.
 scandirsorting_order now accepts constants. Any nonzero value caused descending order in previous versions.
 session_set_save_handlerAdded SessionHandlerInterface for implementing session handlers and SessionHandler to expose internal PHP session handlers.
 snmp_set_valueretrievalConstants SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY may be combined with SNMP_VALUE_OBJECT resulting different way of representing contents of value array element in return value of GET-function. If no SNMP_VALUE_{PLAIN,LIBRARY} constant is accompanying SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used. Prior to 5.4.0 SNMP_VALUE_OBJECT effecively meant SNMP_VALUE_OBJECT|SNMP_VALUE_PLAIN.
 SoapClient::SoapClientNew keep_alive option.
5.3.9is_subclass_ofAdded allow_string parameter
5.3.6DateTime::modifyAbsolute date/time statements now take effect. Previously, only relative parts were used.
 DOMDocument::saveHTMLThe node parameter was added.
 PDO_MYSQL DSNPrior to version 5.3.6, charset was ignored.
5.3.4rawurlencode因为 rawurlencode 使用了 EBCDIC,所以波浪线字符不会再被编码。
5.3.3DOMXPath::evaluateThe registerNodeNS parameter was added.
 DOMXPath::queryThe registerNodeNS parameter was added.
 json_encodeoptions 参数增加常量:JSON_NUMERIC_CHECK。
 ldap_sasl_bindSupport on Windows was added.
 openssl_decryptThe iv parameter was added.
 openssl_encryptThe iv parameter was added.
 parse_url在 URL 解析失败时将不会产生 E_WARNING 级别的错误。
5.3.2flock在文件资源句柄关闭时不再自动解锁。现在要解锁必须手动进行。
 gmp_initThe base was extended from 2 to 36, to 2 to 62 and -2 to -36.
 gmp_strvalThe base was extended from 2 to 36, to 2 to 62 and -2 to -36.
 imap_appendAdded INTERNALDATE support to imap_append.
 imap_openparams added
5.3.1ibase_queryOn success the function now returns TRUE if there were no affected rows, where it previously returned 0 (a zero followed by an empty space).
 rename可以在 Windows 上跨驱动器 rename 文件。
5.3.0DateTime::__constructIf an invalid date is specified, then an exception is now thrown. Previously an error was emitted.
 DateTime::modify将返回值从NULL改为 DateTime 类型。
 DateTime::setDate将返回值从NULL改为 DateTime 类型。
 DateTime::setISODate将返回值从NULL改为 DateTime 类型。
 DateTime::setTime将返回值从NULL改为 DateTime 类型。
 DateTime::setTimezone将返回值从NULL改为 DateTime 类型。
 DateTimeZone::getTransitionsThe optional timestamp_begin and timestamp_end were added.
 DateTimeZone::listIdentifiersAdded the optional what and country parameters.
 acoshThis function is now available on all platforms
 asinh此函数在所有平台上均可用
 atanh此函数在所有平台上都可以用了
 call_user_funcThe interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static.
 call_user_func_arrayThe interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static.
 checkdnsrrThis function is now available on Windows platforms.
 clearstatcache增加了可选的 clear_realpath_cache 和 filename 参数.
 copy增加了对 context 的支持。
 date_default_timezone_set现在会抛出 E_WARNING 而不是 E_STRICT。
 define_syslog_variablesThis function now throws an E_DEPRECATED notice.
 dns_get_recordPrior to this release, if the authns parameter was given, the addtl parameter was also required.
 dns_get_recordThis function is now available on Windows platforms.
 expm1此函数在所有平台上均可用
 fgetcsv增加了 escape 参数。
 fnmatch此函数开始在 Windows 平台上生效。
 func_get_argIf 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.
 func_get_argThis function can now be used in parameter lists.
 func_get_argsThis function can now be used in parameter lists.
 func_get_argsIf 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.
 func_num_argsThis function can now be used in parameter lists.
 func_num_argsIf 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.
 get_object_varsThis function now returns NULL if the object isn't an object.
 getimagesizeAdded icon support.
 getmxrrThis function is now available on Windows platforms.
 imagecolorclosesthwb在 Windows 平台上可用
 imagefilterPixelation support (IMG_FILTER_PIXELATE) was added.
 inet_ntopThis function is now available on Windows platforms.
 inet_ptonThis function is now available on Windows platforms.
 json_decodeAdded the optional depth. The default recursion depth was increased from 128 to 512
 json_encode增加 options 参数.
 link该功能在 Windows 平台下开始有效(Vista、 Server 2008 或更高版本)。
 linkinfoWindows 平台上开始可用(Vista、Server 2008 或更高版本)。
 log1p此函数在所有平台上均可用
 mb_get_info条目 "http_output_conv_mimetypes" 开始有效。
 mcrypt_create_ivIt is no longer required to call srand first. This is now done automatically.
 mcrypt_create_ivMCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM became available on Windows platforms.
 mktimemktime now throws E_DEPRECATED notice if the is_dst parameter is used.
 parse_ini_fileAdded optional scanner_mode parameter. Single quotes may now be used around variable assignments. Hash marks (#) may no longer be used as comments and will throw a deprecation warning if used.
 pg_lo_importThe optional object_id was added.
 property_existsThis 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_functionTicks are now supported on threaded web server modules.
 round引入了 mode 参数
 session_startIf a session fails to start, then FALSE is returned. Previously TRUE was returned.
 shm_attachThis function now returns a 资源(resource) instead of an integer.
 socket_create_pairThis function is now re-enabled on Windows platforms.
 stream_context_createAdded the optional params argument.
 stream_socket_pairThis function is now available on Windows platforms.
 strtotime在 PHP 5.3.0 之前, 24:00 不是一个有效的格式,并且 strtotime 会返回 FALSE。
 sybase_connectThe new parameter was added.
 symlink此函数在 Windows 平台上可用(Vista、Server 2008 或更高版本)。
 touch能够修改 Windows 下目录的最后修改时间。
 ReflectionFunction::__constructname can now be a closure.
5.2.10ip2longPrior to this version, ip2long would sometimes return a valid number even if passed an value which was not an (IPv4) Internet Protocol dotted address.
5.2.8XSLTProcessor::importStylesheetAccepts SimpleXMLElement again which was broken since PHP 5.2.6.
5.2.7parse_ini_fileOn syntax error this function will return FALSE rather than an empty array.
 roundround 的内部运作修改符合 C99 的标准。
 strtotimeIn PHP 5 prior to 5.2.7, requesting a given occurrence of a given weekday in a month where that weekday was the first day of the month would incorrectly add one week to the returned timestamp. This has been corrected in 5.2.7 and later versions.
5.2.6fopen增加了选项 'c' 和 'c+'
5.2.5imagefilterAlpha support for IMG_FILTER_COLORIZE was added.
5.2.4checkdnsrrTXT type was added.
 ldap_first_attributeThe ber_identifier was removed. This is now handled automatically by PHP.
 ldap_next_attributeThe ber_identifier was removed. This is now handled automatically by PHP.
 parse_ini_file由数字组成的键名和小节名会被 PHP 当作整数来处理,因此以 0 开头的数字会被当作八进制而以 0x 开头的会被当作十六进制。
5.2.3getimagesizeRead errors generated by this function downgraded to E_NOTICE from E_WARNING.
 json_decodeThe nesting limit was increased from 20 to 128
 XMLWriter::writeElementThe content parameter became optional.
 XMLWriter::writeElementNSThe content parameter became optional.
 PDOStatement::getColumnMetatable field
5.2.2DOMDocument::registerNodeClassPrior to 5.2.2, a previously registered extendedclass had to be unregistered before being able to register a new class extending the same baseclass.
 ftp_ssl_connectThe function was changed to return FALSE when it can't use an SSL connection, instead of fallbacking to a non-SSL one as previously.
 proc_terminatePrevious versions used to destroy the given process resource.
 token_get_allLine numbers are returned in element 2
5.2.1json_decodeAdded support for JSON decoding of basic types.
 mt_srandThe 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_openAdded the bypass_shell option to the other_options parameter.
5.2.0base64_decode增加了 strict 。
 imagettftextIt is now possible to specify an hexadecimal entity in text.
 imap_openn_retries added
 imap_reopenn_retries added
 mb_strrpos增加了可选参数 offset。
 openssl_verifyThe signature_alg parameter was added.
 pathinfo添加了常量 PATHINFO_FILENAME。
 session_get_cookie_paramsThe "httponly" entry was added in the returned array.
 session_set_cookie_paramsThe httponly parameter was added.
 setcookieThe httponly parameter was added.
 setrawcookieThe httponly parameter was added.
 snmp_set_oid_numeric_printSince PHP 5.2.0.
 PDOStatement::executeThe keys from input_parameters must match the ones declared in the SQL. Before PHP 5.2.0 this was silently ignored.
 SimpleXMLElement::childrenThe optional parameter is_prefix was added.
 SimpleXMLElement::__constructAdded the ns and is_prefix parameters.
 SoapServer::SoapServerAdded the typemap option.
 SWFMovie::streamMP3skip added
 XMLReader::openencoding and options were added.
 XMLReader::XMLencoding and options were added.
5.1.3get_headers自 PHP 5.1.3 起本函数使用默认的流上下文,其可以用 stream_context_get_default 函数设定和修改。
 http_build_query方括号也会被转义。
 mb_get_info实体 "mail_charset"、"mail_header_encoding" 和 "mail_body_encoding" 开始有效。
 SoapClient::__doRequestThe one_way parameter was added.
 XMLReader::getAttributeReturn NULL if no attribute found. Previously, returned an empty string.
5.1.2date_default_timezone_set本版本开始验证 timezone_identifier 参数。
 http_build_query加入了参数 arg_separator。
 parse_url增加了参数 component。
 SimpleXMLElement::__constructAdded the options and data_is_url parameters.
5.1.1dateThere are useful constants of standard date/time formats that can be used to specify the format parameter.
5.1.0DOMDocument::saveAdded the options parameter
 DOMDocument::saveXMLAdded the options parameter
 ctype_digitBefore PHP 5.1.0, this function returned TRUE when text was an empty string.
 dateThe valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).
 date现在发布 E_STRICT 和 E_NOTICE 时区错误。
 date_sunrise现在发布 E_STRICT 和 E_NOTICE 时区错误。
 date_sunset现在发布 E_STRICT 和 E_NOTICE 时区错误。
 file_get_contentsAdded the offset and maxlen parameters.
 file_put_contents添加了对 LOCK_EX 的支持和 data 参数处理 stream 资源的功能。
 gettimeofday增加了参数 return_float。
 globGLOB_ERR was added
 imagerotate新增: ignore_transparent 。
 localtime现在发布 E_STRICT 和 E_NOTICE 时区错误。
 mktimeWhen called with no arguments, mktime throws E_STRICT notice. Use the time function instead.
 mktime现在发布 E_STRICT 和 E_NOTICE 时区错误。
 mktimeis_dst 参数被废弃。出错时函数返回 FALSE 而不再是 -1。修正了本函数可以接受年月日参数全为零。
 openssl_pkcs7_verifyThe content parameter was added.
 session_regenerate_idAdded the delete_old_session parameter.
 sqlite_execAdded the error_msg parameter
 sqlite_fetch_column_typesAdded result_type
 sqlite_queryAdded the error_msg parameter
 sqlite_unbuffered_queryAdded the error_msg parameter
 stream_copy_to_streamAdded the offset parameter
 stream_filter_appendPrior to PHP 5.1.0, this function returns TRUE on success 或者在失败时返回 FALSE.
 stream_filter_prependPrior to PHP 5.1.0, this function returns TRUE on success 或者在失败时返回 FALSE.
 stream_get_contentsThe offset was added.
 strftime现在发布 E_STRICT 和 E_NOTICE 时区错误。
 strtotime失败时返回 FALSE,不再是 -1。
 strtotime现在发布 E_STRICT 和 E_NOTICE 时区错误。
 XSLTProcessor::registerPHPFunctionsThe restrict parameter was added.
5.0.3get_class_varsDepending on the scope, get_class_vars will only return the properties that can be accessed from the current scope.
 is_subclass_ofYou may also specify the object parameter as a string (the name of the class)
5.0.2class_exists不再为已定义的 interface 返回 TRUE。请使用 interface_exists。
 get_class_varsCalling get_class_vars will now expose all the properties as an array, unlike previous behaviour where protected and private properties were prefixed with nul bytes.
 strtotime在 PHP 5 中到 5.0.2 之前,"now" 和其它相对时间从今天午夜起错误计算了。这和正确从当前时间起计算的其它版本不同。
5.0.1get_class_varsCalling get_class_vars will expose all properties, as when converting an object to a class.
5.0.0apache_get_modulesBecame available when using Apache 1, or the PHP Apache 2 filter API. Before this time, it was only available when using the Apache 2 handler API.
 apache_get_versionBecame available with the Apache 2 filter API.
 checkdnsrrAAAA type was added.
 class_exists增加参数 autoload。
 dirnamedirname 的操作从 PHP 5.0.0 版开始是二进制安全的。
 emptyObjects with no properties are no longer considered empty.
 fgetss参数 length 从 此开始可选。
 file增加了参数 context
 filePrior to PHP 5.0.0 the flags parameter only covered include_path and was enabled with 1
 file_get_contentsAdded context support.
 file_put_contentsAdded context support
 get_class_methods自 PHP 5 起,本函数按照方法被定义的名字返回(区分大小写)。在 PHP 4 中总是返回小写的。
 ip2longPrior to this version, ip2long returned -1 on failure.
 is_executableis_executable 开始可用以于 Windows。
 mb_encode_mimeheader增加了 indent 参数。
 mb_send_mail自 PHP 5.0.0 起可以重新定义 Content-Type 和 Content-Transfer-Encoding 头。 在此之前,总是使用 mb_language 定义的值。
 mkdir添加 recursive 参数。
 mkdirmkdir 也可用于某些 URL 封装协议。参见 的列表看看 mkdir 支持哪些 URL 封装协议。
 mysql_fetch_objectAdded the ability to return as a different object.
 opendirpath 支持 ftp:// URL wrapper
 openssl_pkcs7_encryptThe cipherid parameter was added.
 openssl_signThe signature_alg parameter was added.
 parse_ini_file该函数也开始处理选项值内的新行。
 proc_openAdded the cwd, env and other_options parameters.
 realpath在此之前的版本中,如果 path 传入了空或者 NULL,将导致 realpath 返回脚本当前的目录。
 renamerename 也可用于某些 URL 封装协议。参见 的列表看看 rename 支持哪些 URL 封装协议。
 rmdir自 PHP 5.0.0 起 rmdir 也可用于某些 URL 封装协议。参见 的列表看看 rmdir 支持哪些 URL 封装协议。
 session_idThe , (comma) and - (minus) characters are allowed in the file session handler.
 socket_createThe AF_INET6 constant was added.
 strtotimeMicroseconds began to be allowed, but they are ignored.
 unlink自 PHP 5.0.0 起 unlink 也可以用于某些 URL 封装协议。参考 中的列表看哪些封装协议支持 unlink。

附录
PHP Manual