No, if the server parses the page as php it will never be visible, and if not, it will be visible no matter where you put it.
But, don’t do that Keep all of that logic separate from the html (view/template) part of your page; even just moving it all to the top of the file is a start.