php8.5
Home/ Manual/ swoole / async/ Swoole\Async::readFile

Swoole\Async::readFile

PHP function Edit on GitHub ✎

(PECL swoole >= 1.9.0)

Read a file asynchronously.

Description

Swoole\Async::readFile(string $filename, callable $callback): void

Parameters

filename

The filename of the file being read.

callback
callback(string $filename, string $content): mixed
filename

The name of the file.

content

The content read from the file.

Source: reference/swoole/swoole/async/readfile.xml · from the official PHP manual (php/doc-en)