Remember to save source code file *.php with UTF-8 without BOM.
If saved with UTF-8 BOM the next code allways return "true":
<?php
if headers_sent($source,$numline)
{
die("true");
}
else
{
die("false");
}
?>
Even when $numline is 1, and there is any character before <?php
and after ?>
Save file without BOM and everything will be ok, then.