Is it possible to call an undefined variable without getting an "undefined variable" message?
<p>I'm trying to make a simple little templating system where I don't want to define every variable that's available in the template. For example.</p>

<p>Every page would have </p>

<pre><code>&lt;?php displayHTML($variable); ?&gt; 
</code></pre>

<p>but only some pages would actually have $variable defined.</p>

<pre><code>$variable = "something";
</code></pre>

<p>In included functions.php I have tried</p>

<pre><code>function displayHTML($variable){
if(isset($variable)){
echo $variable;
}else{
echo '';
        }
}
</code></pre>

<p>But the error seems to be coming from the fact that $variable isn't defined rather than not being set with a value. This error only shows with E_ALL enabled and I know I can shut it with @ or simply defining $variable across the board. Any function or best practice to avoid having to do this?</p>

<p>I know this seems weird but I would like to option to not define every variable if its not gonna be used on a page.</p>
