php8.5
Home/ Manual/ imap / functions/ imap_is_open

imap_is_open

PHP function Edit on GitHub ✎

(PHP 8 >= 8.2.1)

Check if the IMAP stream is still valid

Description

imap_is_open(IMAP\Connection $imap): bool

Check if the IMAP stream is still valid.

Parameters

Return Values

Returns true if the stream is still valid, false otherwise.

Examples

imap_is_open() example

php
<?php
$mbox = imap_open("{imap.example.org:143}INBOX", "username", "password") or die(implode(", ", imap_errors()));
imap_is_open($mbox);
// ...
?>

Source: reference/imap/functions/imap-is-open.xml · from the official PHP manual (php/doc-en)