php8.5
Home/ Manual/ dio / functions/ dio_close

dio_close

PHP function Edit on GitHub ✎

(PHP 4 >= 4.2.0, PHP 5 < 5.1.0)

Closes the file descriptor given by fd

Description

dio_close(resource $fd): void

The function dio_close() closes the file descriptor fd.

Parameters

fd

The file descriptor returned by dio_open().

Return Values

Void

Examples

Closing an open file descriptor

php
<?php
$fd = dio_open('/dev/ttyS0', O_RDWR);

dio_close($fd);
?>

See Also

Source: reference/dio/functions/dio-close.xml · from the official PHP manual (php/doc-en)