The first is better in all cases. What for? Just because there is no need to hide any characters, and the editors have syntax highlighting. It also makes your code more readable (especially if you use indentation in HTML)
In addition, the ability to alternate HTML and PHP is a major feature of PHP. It should have been used like that. You can even do things like:
The programmer says <?php if(isGoodbye()){ ?> goodbye <?php }else{ ?> hello <?php }?> world
It makes life easy for you, so why not use it?
source share