Actually, php does conseal the code, even from viewsource, as " view source " only allows for true html to be displayed. To kill the arguement of " why does it show javascript tags if that's the case ? "...Simply due to the script you are looking at being an " HTML recognition tag ", to relay and function from the true javascript that is actually in the .js code document on the server through the html on the page you are sourcing. Also, even though a site may be saved as a .php file, the search engine is only reading the standard html code within that page. Otherwise, it is being recognized and passed on and in fact, overlooked all together.
All you see in a " view source " is true html. If you want to hide your cookie scripts, I agree with using php or better yet, plain javascript, neither of which a browser can read.
Think of it in terms of a web editor. If you have one that is basic, you can only read HTML but if you have an advanced, apache based, multiple code language enabled program such as D*reamWe*aver, you can read html, java, php, perl, etc.
Common unknown tip: Search engine bots, spiders and even the new " censorship" scripts they are beta testing can NOT read anything other than HTML. It recognizes and skips javascript, php and pretty much any other langauge there is, passing it as " programming code. " This is why if you program in php or javascript, the engines can't read your code, which is also why so many of the internet marketing gurus got into it in the first place.
It wasn't about getting faster loading pages and repeating graphics. It was to cover and cover up page rotators, cookies and other things that simply are busted and counted out when used in simple html, which is obviously your issue here.
Hope this helps.