PHP library for HTML output
<p>Is there an standard output library that "knows" that php outputs to html?</p>

<p>For instance:</p>

<ol>
<li><code>var_dump</code> - this should be wrapped in <code>&lt;pre&gt;</code> or maybe in a table if the variable is an array</li>
<li>a version of echo that adds a <code>"&lt;br/&gt;\n"</code> in the end</li>
<li>Somewhere in the middle of PHPcode I want to add an H3 title:</li>
</ol>

<p>.</p>

<pre><code>?&gt;&lt;h3&gt;&lt;?= $title ?&gt;&lt;/h3&gt;&lt;?
</code></pre>

<p>Out of php and then back in. I'd rather write:</p>

<pre><code>tag_wrap($title, 'h3');
</code></pre>

<p>or</p>

<pre><code>h3($title);
</code></pre>

<p>Obviously I can write a library myself, but I would prefer to use a conventional way if there is one.</p>

<h2>Edit</h2>

<p>3 Might not be a good example - I don't get much for using alternative syntax and I could have made it shorter.<br />
1 and 2 are useful for debugging and quick testing.<br />
I doubt that anyone would murder me for using some high-level html emitting functions of my own making when it saves a lot of writing.</p>
