In this I would like to achieve the opposite, there are no errors, I want to generate them. I'm studying the use of PHP's ob_* functions. I found this code to understand the concepts, and it is supposed to throw an error, since I understand that once an output is sent, the headers can no longer be modified, or set the sessions or cookies. Can someone explain to me why everything flows smoothly?
<?php
//ob_start();
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
?>
<html>
<head>
<title>Página procesada con buffer de salida</title>
</head>
<body>
Esta es mi página!!!
</body>
</html>
<?php
setcookie("nombre", "john");
//ob_end_flush();
?>