First off, eval() is not needed for this code, as it contains no PHP which needs to be executed. eval() is a very dangerous function.
You contents is in $html as a string, therefore, you can now use a significantly safer function called str_replace() to look for, and replace the value placeholders with the correct data.
The function uses the following arguments: str_replace($search, $replace, $subject), accepts arrays as arguments, and returns the full string with replaced values.
Therefore, to answer your question:
// $html = ...
$search = array(
'{$heading}',
'{$paragraph}'
);
$replace = array(
'My Heading',
'My Paragraph',
);
$replaced_string = str_replace($search, $replace, $html)