What about file_get_contents() with timeout.
if (isset($_GET['async'])) {
    for( $i = 0 ; $i <= 5 ; $i++ )
    {
        append_log(date('l jS \of F Y h:i:s A') . ': background process. parameter ' . $i . ': ' . $_GET[$i] . '<br />');
        sleep(1);
    }
    exit;
}
header( 'Content-type: text/html; charset=utf-8' );
$parameters = array('async' => true, 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', 5 => 'five');
pseudo_async($parameters);  // this runs this php script in the backbround
echo 'Begin ...<br />';
for( $i = 0 ; $i <= 5 ; $i++ )
{
    output_buffer('appended to the log <br />');
    append_log(date('l jS \of F Y h:i:s A') . ': main process.<br />');
    sleep(1);
}
echo 'End ...<br />';
function pseudo_async($query) {
    $timeout = array('http' => array('timeout' => 0.01));
    $context = stream_context_create($timeout);
    @file_get_contents(selfurl() . '?' . http_build_query($query), false, $context);
}
function append_log($msg) {
    $file = __DIR__ . '/log.html';
    file_put_contents($file, $msg, FILE_APPEND);
}
function selfurl() {
    $pageURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
    if ($_SERVER["SERVER_PORT"] != "80")
        $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
    else 
        $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
    return $pageURL;
}
function output_buffer($str) {
    echo $str;
    flush();
    ob_flush(); 
}