变更的函数
PHP 核心
- debug_zval_dump() 现在打印 "int" 替代 "long", 打印 "float" 替代 "double"
-
dirname() 增加了可选的第二个参数,
depth
, 获取当前目录向上depth
级父目录的名称。 - getrusage() 现在支持 Windows.
-
mktime() and gmmktime() 函数不再接受
is_dst
参数。 -
preg_replace() 函数不再支持
"\e" (
PREG_REPLACE_EVAL
). 应当使用 preg_replace_callback() 替代。 -
setlocale() 函数不再接受
category
传入字符串。 应当使用LC_*
常量。 - exec(), system() and passthru() 函数对 NULL 增加了保护.
- shmop_open() 现在返回一个资源而非一个int, 这个资源可以传给shmop_size(), shmop_write(), shmop_read(), shmop_close() 和 shmop_delete().
- substr() 现在当 start 的值与 string 的长度相同时将返回一个空字符串。
- xml_parser_free()不再足以释放解析器资源,如果它引用了一个对象,而这个对象又引用了那个解析器资源。在这种情况下,需要额外地取消设置 $parser。

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/migration70.changed-functions.php