summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/fpm.php
blob: 08b3941071aee564d51ae71b20af7bb19ffae66c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace Safe;

use Safe\Exceptions\FpmException;

/**
 * This function flushes all response data to the client and finishes the
 * request. This allows for time consuming tasks to be performed without
 * leaving the connection to the client open.
 *
 * @throws FpmException
 *
 */
function fastcgi_finish_request(): void
{
    error_clear_last();
    $result = \fastcgi_finish_request();
    if ($result === false) {
        throw FpmException::createFromPhpError();
    }
}