title: PHP class: Global variable as property in class
body: <p>I have a global variable outside my class = $MyNumber;</p>
  
  <p><br/>
  How do I declare this as a property in <em>myClass</em>?<br>
  For every method in my class, this is what I do:</p>
  
  <pre><code>class myClass() {
  
      private function foo() {
           $privateNumber = $GLOBALS['MyNumber'];
      }
  
  }
  </code></pre>
  
  <p><br/><br/>
  I want this</p>
  
  <pre><code>class myClass() {
  
      //What goes here?
      var $classNumber = ???//the global $MyNumber;
  
      private function foo() {
           $privateNumber = $this-&gt;classNumber;
      }
  
  }
  </code></pre>
  
  <p><br/><br/></p>
  
  <p><strong>EDIT:</strong> I want to create a variable based on the global $MyNumber but<br>
   modified before using it in the methods </p>
  
  <p>something like: var $classNumber = global $MyNumber + 100; </p>