title: __METHOD__ and __FUNCTION__
body: <p>I know difference between these two, and I've checked the manual.</p>
  
  <p>I'm stll have some confusion. I can use <code>__FUNCTION__</code> in method of class, this represents the name of this method. When I echo it, it just output the name. Here is clear.</p>
  
  <p>But Why I can use <code>__METHOD__</code> in a non-calss method. This also just represents the name of the normal funciton. Is the normal function is in some some container? and when echo <code>__METHOD__</code> in the normal function, the container is nothing?</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;?php
  class dog {
      private $name = 'dog';
  
      public static function name() {
          echo __METHOD__;
          echo"\n";
          echo __FUNCTION__;
          echo"\n";
      }
  
  }
  function test() {
      echo __FUNCTION__;
      echo"\n";
      echo __METHOD__;
  }
  
  dog::name();
  test();
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>ei@localhost:~$ php test.php
  dog::name
  name
  test
  test
  </code></pre>
  
  <p>Any help will appreciated. Thanks.</p>