Will PHP script be executed after header redirect?
<p>Yes, this question has been asked before, however, the answers have been inconsistent.  Take <a href="http://stackoverflow.com/questions/2747791/why-i-have-to-call-exit-after-redirection-through-headerlocation-in-php">Why I have to call &#39;exit&#39; after redirection through header(&#39;Location..&#39;) in PHP?</a> for instance.  Ever answer (including the accepted answer) states always yes, except the last answer which received zero votes which says "maybe".  I am starting to think the correct answer is "maybe".  To make it a simple "yes" or "no" question, will doThis() be executed given the following script?  Thanks</p>

<pre><code>header('Location: http://somewhereElse.com');
//die();
sleep(1000);
doThis();
</code></pre>

<p>EDIT
Thanks, all. With my PHP/Linux/Apache configuration, the second syslog() executes, so the answer is "yes, all script down stream of the header will be executed."  I will assume (and hope I am correct) it is the same with all PHP/Linux/Apache configurations!</p>

<pre><code>&lt;?php
  header('Location: http://google.com');
  syslog(LOG_INFO,'first');  
  sleep(5);
  syslog(LOG_INFO,'Second');  
?&gt;
</code></pre>
