Server-sent events in PHP (without echo or print)
PHP Snippet 1:
/**
* Send Data
*
* @param string $content
*/
function sseEchoAlternative(string $content)
{
ob_start(function () use ($content) { //Expect a warning here
return $content;
});
ob_end_flush();
}