title: PHP call functions from different places
body: <p>I need a little help. I have this class, that measures page load time </p>
  
  <pre><code>&lt;?php 
  class Page {
      private static $start;
      private static $end;
  
      static public function setStartPage(){
  
         return self::$start = microtime(true);
      }
  
      static public function setEndPage(){
  
        return  self::$end = microtime(true);
      }
  
      static public function loadTime(){
          return  self::$end -  self::$start;
      }
  }
  ?&gt;
  </code></pre>
  
  <p>and i call in start of header this:</p>
  
  <pre><code>&lt;?php
  Page::setStartPage();
  ?&gt;
  </code></pre>
  
  <p>in html body i calling this </p>
  
  <pre><code>&lt;?php echo Page::loadTime();?&gt;
  </code></pre>
  
  <p>and in the end of page I calling this </p>
  
  <pre><code>&lt;?php
  Page::setEndPage();
  ?&gt;
  </code></pre>
  
  <p>How do I send values from end page to body in <code>loadTime</code> function?</p>