title: OO PHP Accessing public variable from another class
body: <p>I have a class like the following:</p>
  
  <pre><code>class game {
  
      public $db;
      public $check;
      public $lang;
  
      public function __construct() {
  
          $this-&gt;check = new check();
  
          $this-&gt;lang = DEFAULT_LANG;
          if (isset($_GET['lang']) &amp;&amp; !$this-&gt;check-&gt;isEmpty($_GET['lang']))
              $this-&gt;lang = $_GET['lang'];
      }
  
  }
  </code></pre>
  
  <p>As you can see I have a public variable <code>$lang</code> that is also defined via the contructor.</p>
  
  <p>The proble is that I want to access the result of this variable from other classes that are not directly related to this class, since I don't want to redeclare it for each different class.</p>
  
  <p>So for example how can I call the result of that variable from another class, lets call it <code>class Check</code> ?</p>