title: Php resume execution at same state after crash/shutdown of server
body: <p>I'm curious to find out a right way to my requirement </p>
  
  <p>Suppose your php code is -> </p>
  
  <pre><code>&lt;?php 
  for ($i=1; $i &lt;= 100 ; $i++) { 
      sleep(1); #sleep for a second 
      echo "\n $i*2=". $i * 2 ; #do some work
  }
  ?&gt;
  </code></pre>
  
  <p>The above program prints table of 2 <strong>every second</strong> and will execute <strong>until 100 seconds</strong>. </p>
  
  <p>Suppose on <strong>50th second</strong> the server is <strong>crashed/reboot/shutdown</strong>.</p>
  
  <p>Now is that possible to <strong>resume back on 51st second</strong> with the same state of PHP including temp/local values and variables.</p>
  
  <p>Alternatively is that possible to hibernate the execution of PHP. If PHP is not the answer, is their any other language that I can use. </p>