Porqué este código tan simple muestra error la asignar la cookie como si ya se hubiera escrito algo antes de setear la cookie
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<?php
$value = 'cualquier cosa';
setcookie("TestCookie", $value);
?>
</body>
</html>
El warning que muestra xdebug es:
Warning: Cannot modify header information - headers already sent by (output started at /srv/http/codiad/workspace/aulamentor/php/2016/temp.php:8) in /srv/http/codiad/workspace/aulamentor/php/2016/temp.php on line 10