> For the complete documentation index, see [llms.txt](https://php7.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://php7.shujuwajue.com/php-70x-xin-te-xing/bu-5145-bian-geng-de-han-shu.md).

# 补充\*变更的函数

> 参考: [变更的函数](http://php.net/manual/zh/migration70.changed-functions.php)

## 变更的函数

### PHP 核心

* [debug\_zval\_dump()](http://php.net/manual/zh/function.debug-zval-dump.php)
* 现在打印 "int" 替代 "long", 打印 "float" 替代 "double"
* [dirname()](http://php.net/manual/zh/function.dirname.php) 增加了可选的第二个参数,`depth`, 获取当前目录向上`depth`级父目录的名称。
* [getrusage()](http://php.net/manual/zh/function.getrusage.php) 现在支持 Windows.
* [mktime()](http://php.net/manual/zh/function.mktime.php) and [gmmktime()](http://php.net/manual/zh/function.gmmktime.php) 函数不再接受`is_dst`参数。
* [preg\_replace()](http://php.net/manual/zh/function.preg-replace.php) 函数不再支持 "\e" ( `PREG_REPLACE_EVAL`). 应当使用 [preg\_replace\_callback()](http://php.net/manual/zh/function.preg-replace-callback.php) 替代。
* [setlocale()](http://php.net/manual/zh/function.setlocale.php) 函数不再接受 `category`传入字符串。 应当使用`LC_*`常量。
* [exec()](http://php.net/manual/zh/function.exec.php), [system()](http://php.net/manual/zh/function.system.php) and [passthru()](http://php.net/manual/zh/function.passthru.php) 函数对 NULL 增加了保护.
* [shmop\_open()](http://php.net/manual/zh/function.shmop-open.php) 现在返回一个资源而非一个int， 这个资源可以传给[shmop\_size()](http://php.net/manual/zh/function.shmop-size.php),[shmop\_write()](http://php.net/manual/zh/function.shmop-write.php),[shmop\_read()](http://php.net/manual/zh/function.shmop-read.php),[shmop\_close()](http://php.net/manual/zh/function.shmop-close.php)

  和[shmop\_delete()](http://php.net/manual/zh/function.shmop-delete.php)
* [substr()](http://php.net/manual/zh/function.substr.php) 现在当 start 的值与 string 的长度相同时将返回一个空字符串。
* 为了避免内存泄露，[xml\_set\_object()](http://php.net/manual/zh/function.xml-set-object.php) 现在在执行结束时需要手动清除 $parse。
