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