what is php exit doing in function?
<p>Hi I have this function</p>

<pre><code>function fail($pub, $pvt = '')
{
    global $debug;
    $msg = $pub;
    if ($debug &amp;&amp; $pvt !== '')
        $msg .= ": $pvt";

    $_SESSION['msg'] = $msg;
    header ("Location: /voting/"); 
    exit;
}
</code></pre>

<p>The page should redirect before it gets to the exit command right? Without the exit command however the function doesn't work correctly (it continues on even though it should have redirected). If anyones knows could you explain why the code continues on if the function did not exit even though in both cases it will redirect?</p>
