How do I check if a function is being passed as a parameter?
<h2>Question:</h2>

<p><strong>How do I check if a function is being passed as a parameter?</strong></p>

<p>Especially if the function being passed is returning a string etc?</p>

<p>IE in the example below I don't want to htmlentities the function html being passed as a parameter, but I do want to htmlentities anything else. Also assuming there could be more than a single parameter that needs to take a function later.</p>

<h3>Example:</h3>

<pre><code>function html($tag,$content)
{

if(!is_callable($content)){$var=htmlentities($var, ENT_NOQUOTES, "UTF-8");}

return "&lt;".$tag."&gt;".$content."&lt;/".$tag."&gt;";

}


echo html(html('Example','Example'),'Example');
</code></pre>

<p>This example does not seem to work for me. I still get htmlentitied content when its a function.</p>
