Why this simple code shows error assigning the cookie as if something had already been written before setting the 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>
The warning that xdebug shows is:
Warning: Can not 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