title: Use parents child method in other child class (same parent)
body: <p>I have some issues with OOP. I just started OOP in php and i have some issues.
  So i have a question for you, maybe you'll help me.</p>
  
  <p>I have multiple classes (in this case 3)</p>
  
  <pre><code>        &lt;?php
              //FILE class.NB.php
              class NB { //databse manipulations, curls
                  public $db;
                  function __construct($db) {
                      $this-&gt;db = $db;
                  }
  
                  public function LoginNB () {
                      //something here
                      $this-&gt;db-&gt;query("UPDATE logins SET login_time = %u", time());
                  }
              }
  
              //FILE class.fn.php
              class FN extends NB {
                  public function deposits () {
                      $this-&gt;LoginNB();
                      return $this-&gt;db-&gt;query("SELECT * FROM deposits");
                  }
  
  
                  public function getUserWihdrawsCompared() {
                      // AND HERE I WOULD LIKE TO USE the DR's ::usersWithdraws
                      $users = $this-&gt;usersWithdraws();
                  }
              }
  
  
              //FILE class.dr.php
              class DR extends NB {
                  public function withdraws () {
                      $this-&gt;LoginNB();
                      return $this-&gt;db-&gt;query("SELECT * FROM withdraws");
                  }
  
                  public function usersWithdraws() {
                      $a = $this-&gt;db-&gt;query("SELECT * FROM user_withdraws");
                      /*code here*/
                      return $final_array;
                  }
  
                  public function compare_withdraws_deposits () {
                      // AND HERE I WOULD LIKE TO USE the FN's ::deposits
                      $deposit_list = $this-&gt;deposits();
  
                      /* code here */
  
                      return $final_array;
                  }
              }
  
          ?&gt;
  </code></pre>
  
  <p>So my question is, how is possible to use everything in everywhere.
  I saw something with traits but i'm not sure, how to use and what exactly to use.
  My problems is what i want to user parent's child method in other child with same parent.
  But in the end, i would like to use only the parent class for "runing" implementing in other classes if it's possible.
  Like:</p>
  
  <pre><code>    $NB = new NB($db);
      $result = $NB-&gt;ShowResults();
  </code></pre>
  
  <p>Problem: ShowResults() should use both child's methods and child methods used in  ShowResults() some times use methods from other child class.</p>
  
  <p>Maybe it's impossible but i would appreciate if you could help me. (even with a confirmation that is not possible)</p>
  
  <p>Thank you.</p>