# 补充\*新函数

参考: [New functions ](http://php.net/manual/zh/migration70.new-functions.php)

## 新函数

### [Closure](http://php.net/manual/zh/class.closure.php)

* **Closure::call()**

### [CSPRNG](http://php.net/manual/zh/book.csprng.php)

* [random\_bytes()](http://php.net/manual/zh/function.random-bytes.php)
* [random\_int()](http://php.net/manual/zh/function.random-int.php)

### [Error Handling and Logging](http://php.net/manual/zh/book.errorfunc.php)

* [error\_clear\_last()](http://php.net/manual/zh/function.error-clear-last.php)

### [Generator](http://php.net/manual/zh/class.generator.php)

* **Generator::getReturn()**

### [GNU Multiple Precision](http://php.net/manual/zh/book.gmp.php)

* [gmp\_random\_seed()](http://php.net/manual/zh/function.gmp-random-seed.php)

### [Math](http://php.net/manual/zh/book.math.php)

* [intdiv()](http://php.net/manual/zh/function.intdiv.php) - 整除运算

### [PCRE](http://php.net/manual/zh/book.pcre.php)

* [preg\_replace\_callback\_array()](http://php.net/manual/zh/function.preg-replace-callback-array.php)

### [PHP Options/Info](http://php.net/manual/zh/book.info.php)

* [gc\_mem\_caches()](http://php.net/manual/zh/function.gc-mem-caches.php)
* [get\_resources()](http://php.net/manual/zh/function.get-resources.php)

### [POSIX](http://php.net/manual/zh/book.posix.php)

* [posix\_setrlimit()](http://php.net/manual/zh/function.posix-setrlimit.php)

### [Reflection](http://php.net/manual/zh/book.reflection.php)

* [ReflectionParameter::getType()](http://php.net/manual/zh/reflectionparameter.gettype.php)
* [ReflectionParameter::hasType()](http://php.net/manual/zh/reflectionparameter.hastype.php)
* [ReflectionFunctionAbstract::getReturnType()](http://php.net/manual/zh/reflectionfunctionabstract.getreturntype.php)
* [ReflectionFunctionAbstract::hasReturnType()](http://php.net/manual/zh/reflectionfunctionabstract.hasreturntype.php)

### [Zip](http://php.net/manual/zh/book.zip.php) - 此扩展可以让你透明地读写ZIP压缩文档以及它们里面的文件。

* [ZipArchive::setCompressionIndex()](http://php.net/manual/zh/ziparchive.setcompressionindex.php)
* [ZipArchive::setCompressionName()](http://php.net/manual/zh/ziparchive.setcompressionname.php)

### [Zlib Compression](http://php.net/manual/zh/book.zlib.php)

* [inflate\_add()](http://php.net/manual/zh/function.inflate-add.php)
* [deflate\_add()](http://php.net/manual/zh/function.deflate-add.php)
* [inflate\_init()](http://php.net/manual/zh/function.inflate-init.php)
* [deflate\_init()](http://php.net/manual/zh/function.deflate-init.php)


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
