Embedding PHP in GWT-generated files?
Wednesday, September 27th, 2006I got to wondering if it would be possible to add PHP to the output of the web tookit compiler. In short, the answer is yes. I’ll have to play around with it some more to see what code ends up in cached files and what code goes to nocache files, since that would be rather important.
I tried adding a PHP block to JSNI code. Oddly enough, the compiler complains about the bad syntax. Which is fine since it is bad javascript syntax, to some extent… If nothing else, it’s an inappropriate place for random HTML tags. The compiler will not complain, though, if you stick the code into an HTML comment. But comments get stripped out during obfuscation, so this doesn’t matter.