title: php session_write_close() not commit until script execute complete?
body: <p>I test this script in chrome.</p>
  
  <pre><code>&lt;?php
  session_start();
  if(isset($_SESSION['ddd']) &amp;&amp; $_SESSION['ddd']) {
      exit("SESSION is set");
  } else {
      $_SESSION['ddd'] = true;
      session_write_close();
      //session_commit() is also not work
      sleep(5);
      exit("SESSION is working");
  }
  </code></pre>
  
  <p>I open the PHP file in Chrome, and it echoes "SESSION is working" after 5 seconds.</p>
  
  <p>If I open the file in a new tab before 5 seconds have elapsed, it echoes "SESSION is working", instead of "SESSION is set".</p>
  
  <p>To confirm, if I open the file in a new tab after 5 seconds have elapsed, it does echo "SESSION is set".</p>
  
  <p>Why? Does <code>session_write_close</code>  not commit session data immediately? If it is so, should I want to commit the session immediately, how might I do?</p>