Skip to content

connection_status and connection_aborted does not work #10106

Open
@seltix5

Description

@seltix5

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);
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions