title: Does static variables in php persist across the requests?
body: <h2>Static variable gotcha in php</h2>
  
  <p>I am from Java background and have switched to php for one project recently.
  I have found one unexpected behaviour in php. </p>
  
  <blockquote>
    <p><strong>Value set to some static variable is</strong>
    <strong>not staying persistent across the</strong>
    <strong>requests.</strong></p>
  </blockquote>
  
  <p>I am not sure if this is the expected bahaviour. Because in java , you can always persist very commonly used variables or say constants like dbname,hostname,username,password across the requests so that you don't have to read them always from local property files.</p>
  
  <p>Is this behaviour normal ? And if it is normal then is there any alternative by which I can persist values assigned to variables across the requests ?</p>
  
  <p>Can someone suggest me a better way of doing this in php?</p>