Here are some examples that it should handle:
<span id="<?="1"?>" <?php print \'class="2"\'?>><?php print "3"?></span> <p><?php print "?>";?></p>
Ideally it would produce an abstract syntax tree of html and php nodes. But I would not need the code inside the php tags to also be parsed into a php AST.
Edit: A tokenizer that does not go on to build an AST would also suffice.