You're best off not using short-hand codes altogether. Some server configurations might not support it.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Planning to drop IE support?
Here's a better version:
HTML Code:
<?php $myVar = 'hi!'; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type="text/javascript">
var myVar = '<?php echo $myVar; ?>';
</script>
</head>
<body>
</body>
</html>
Bookmarks