I have the following script.
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
<HTML>
<HEAD>
<TITLE>test</TITLE>
<body>
<?
$foo=1;
if($foo==0){
echo '<div class="main_container">';
echo "no";
echo'</div>';
}
?>
</body>
</html>
in php version 7.4 this outputs nothing. In php8 it outputs '; echo "no"; echo''; } ?> If I remove the html and body tags it outputs nothing. How can I get this if statement to work properly in php8 inside html and body tags?
I expected the script to output nothing in php8