Using htmlspecialchars when not outputting to html
<p>For example if i use <code>$id= $_GET['id'];</code> and then i use that <code>$id</code> as a condition for an if statement, do i have to use htmlspecialchars on <code>$id</code>?</p>

<p>e.g.</p>

<pre><code>$id = htmlspecialchars($_GET['id']);

if($id) {
//code
}
</code></pre>

<p>Is htmlspecialchars needed, even though no html is being output?</p>
