title: How to get vars of method php
body: <p>I want to create Auto breadcrumb as array contain sub arrays with 2 keys ( link, title ).
  like this:</p>
  
  <pre><code>array (
      0 =&gt; array (
          'link' =&gt; 'index',
          'title' =&gt; 'Home :)',
      ),
      1 =&gt; array (
          'link' =&gt; 'advanced',
          'title' =&gt;  'Advanced Setting :)'
      )
  );
  </code></pre>
  
  <h2>Note</h2>
  
  <p>when i use the following code it give me this result but i cannot get the title as you can see on the variable <code>$mytitle</code>.</p>
  
  <pre><code>class Setting extends Controller {
      public function __construct() {
          $relflection = new ReflectionClass ( get_class ( $this ) );
          $methods = $relflection-&gt;getMethods ( ReflectionMethod::IS_PUBLIC );
          if (is_array ( $methods )) {
              foreach ( $methods as $method ) {
                  if ($method-&gt;class == get_class ( $this )) {
                      $breadcrumb[] = array("link" =&gt; $method-&gt;name, "title" =&gt; "???");
                  }
              }
          }
          $breadcrumb = $breadcrumb;
      }
  
      public function index() {
          $mytitle = "Home :)";
      }
  
      public function advanced() {
          $mytitle = "Advanced Setting :)";
      }
  }
  </code></pre>
  
  <p>Can anyone here give me a right solution for this?</p>