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
 
<Direct IO Functionsdio_fcntl>
^Direct IO FunctionsLast updated: Mon, 26 Oct 2026

dio_close

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

dio_close — Closes the file descriptor given by fd

Description

function 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

No value is returned.

Examples

Example #1 Closing an open file descriptor

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

dio_close($fd);
?>

See Also

  • dio_open() - Opens a file (creating it if necessary) at a lower level than the C library input/output stream functions allow


<Direct IO Functionsdio_fcntl>
^Direct IO FunctionsLast updated: Mon, 26 Oct 2026