What problems can leaving a PHP tag inside a function cause?
<p>You would expect this function to print the name in a browser, and it does:</p>

<pre><code>&lt;?php
function name(){
    $var = 'Doe';
    ?&gt;
    John &lt;?php echo $var;
}
name();
?&gt;
</code></pre>

<p>Could this type of function be used as a method of a PHP class, and is this bad code practice?</p>
