title: Static variables in PHP
body: <p>I have found different information regarding static variables in PHP but nothing that actually explains what it is and how it really works. </p>
  
  <p>I have read that when used within a class that a static property cannot be used by any object instantiated by that class and that a static method can be used by an object instantiated by the class? </p>
  
  <p>However, I have been trying to research what a static variable does within a function that is not in a class. Also, does a static variable within a function work somewhat like closure in javascript or am I totally off in this assumption?</p>