title: Echoing values from class PHP
body: <p>I'm noob in PHP, help me please, why it dosen't echo values from my class? Maybe in PHP work with values in class is going by the specific way (I came from Java/C#) ? </p>
  
  <pre><code>&lt;?php
  
  class GuestBook
  {
      private static $numInstances = 0;
      private $var1 = 10;
  
      function __construct()
      {
          $numInstances++;
      }
  
      public static function getNumInstances()
      {
          return $numInstances;
      }
  
      public function getVar1()
      {
          return $var1;
      }
  }
  
  $instance1 = new GuestBook();
  $instance2 = new GuestBook();
  
  echo(GuestBook::getNumInstances());
  echo($instance1-&gt;getVar1());
  </code></pre>
  
  <p>?></p>