ProgS - you do not put anything of your own into the phpinclude template - you put the code exactly as Tim has posted in the first post.
Then, in any template, like he said, if you don't want something to show up for an unregistered user, you comment it out with HTML using the function that you have just pasted by adding the commenting out tags.
Read his first post carefully - he explains it quite well.
Good idea Tim. You can make this into a hack, by placing the same code in global.php.