Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<swoole_async_readswoole_async_set>
^Swoole FunctionsLast updated: Mon, 26 Oct 2026

swoole_async_readfile

(PECL swoole >= 1.9.0)

swoole_async_readfile — Read a file asynchronously

Description

function swoole_async_readfile(string $filename, callable $callback): bool

Parameters

filename

The filename of the file being read.

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

The name of the file.

content

The content read from the file.

Return Values

Returns true on success or false on failure.


<swoole_async_readswoole_async_set>
^Swoole FunctionsLast updated: Mon, 26 Oct 2026