title: PHP: Echo variable name of an object?
body: <p>I want to echo the name of the variable object i'm calling, in this case controller_01. </p>
  
  <p>I'm using get_class, but it wont print the variable name, only the object type :(</p>
  
  <pre><code>&lt;?php
  class remoteControl{
  
      private $chip = "Intel64&lt;br /&gt;";
  
      public function openCase(){
          echo "The controler has a " .get_class($this);
          return $this-&gt;chip;
      }
  
  
  }
  
  $control_01 = new remoteControl();
  
  
  echo $control_01-&gt; openCase();
  
  
  ?&gt; 
  </code></pre>