> 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。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://php7.shujuwajue.com/php-70x-xin-te-xing/bu-5145-bian-geng-de-han-shu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
