doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

connection_status and connection_aborted does not work

Open seltix5 opened this issue 3 years ago • 1 comments

From manual page: https://php.net/function.connection-status

Hi, I tested this using PHP 7.4 but it does not detect disconnect, I try to stop and close the browser.

<?php
ignore_user_abort(true);
set_time_limit(0);

while(1)
{
    echo "\n";
    ob_flush();
    flush();

    // Did the connection fail?
    if(connection_status() != CONNECTION_NORMAL)
    {
        break;
    }

    sleep(1);
}

seltix5 avatar Oct 23 '22 20:10 seltix5