title: Multiple static function call method
body: <p>When I using <code>static::find()</code> function, i want to return the db row result. But at another case, I would like to link to a new class static function <code>update()</code>. For example <code>static::find(1)-&gt;update()</code> and this case <code>return new static</code> needed. I could't find out a condition to decide which return method required. Good day.</p>
  
  <pre><code>class A {
      public static function find($id){
  
          global $db_link;
  
          $id = (integer)$id;
  
          if($id){
  
              $stmt = $db_link-&gt;prepare("select * from ".static::get_table_name()." where ".static::$primary_key." = :id limit 1");
              $stmt-&gt;execute([":id" =&gt; $id]);
              $return = $stmt-&gt;fetch(PDO::FETCH_ASSOC);
  
              if(!empty($return)){
  
                  static::$primary_id[] = $return["id"];
                  static::$data = $return;
  
              }
  
          }
  
          return new static;
  
          return static::format_success($return);
  
      }
  }
  </code></pre>