In PHP, it is not uncommon to see PHP and HTML intermixed in the same file.
<head></head> <body> Hello, today is <?php echo date('l, F jS, Y'); ?>. </body> </html>
<head></head> <body> Hello, today is Thursday, November 12th, 2015. </body> </html>
The above PHP code will run just fine in HHVM. At the command line, the output will be the raw HTML with the proper date included.
This is not supported in Hack - the file must start with
<?hh (except for any shebang lines).
If you really want to mix HTML-like elements with your Hack code, XHP was made especially for that. And, it is typecheckable.