4
I'm not familiar with that theme.
theme.html is processed in a different "environment" than a custom block, so the variables available may be different. Also, theme.html is processed as a Smarty template and may use Smarty tags, while a custom block may not.
You can combine PHP and HTML in a "PHP Script" custom block, for example:
... PHP code ...
?>
... HTML code ...
... more PHP code ...
?>
... more HTML code
The contents of a custom block are blindly jammed into the middle of other code, without any checking for conflicts, so you have to be careful what you put in the block.