title: php oop call method from inside the method from the same class
body: <p>I've got the following issue</p>
  
  <pre><code>class class_name {
  
  function b() {
     // do something
  }
  
  function c() {
  
     function a() {
         // call function b();
     }
  
  }
  
  }
  </code></pre>
  
  <p>When I call function as usual: $this->b();  I get this error: Using $this when not in object context in C:...</p>
  
  <p>function b() is declared as public</p>
  
  <p>any thoughts?</p>
  
  <p>I'll appreciate any help</p>
  
  <p>Thanks</p>